[Xapian-discuss] Search::Xapian add_database'd search results are odd?

Eric Parusel eparusel at creativens.com
Tue Dec 21 22:25:59 GMT 2004


Olly Betts wrote:
> If you search over more than one database, the docids in the underlying
> databases are mapped to avoid collisions.
> 
> The mapping is (at least currently):
> 
>     did_merged = (did_raw - 1) * number_of_databases + offset
> 
> where offset ranges from 1 to number_of_databases.
> 
> You can generally just treat did_merged as an opaque value and use it
> with the combined database to retrieve the appropriate document.

Ah, ok... thanks.

	From your wording, I take it the mapping is possibly due for a change 
in the future?  I'll keep an eye out for that...

Thanks,
Eric





More information about the Xapian-discuss mailing list