[Xapian-discuss] Search::Xapian add_database'd search results
are odd?
Eric Parusel
eparusel at creativens.com
Wed Dec 22 02:31:15 GMT 2004
Olly Betts wrote:
> On Tue, Dec 21, 2004 at 02:46:46PM -0800, Eric Parusel wrote:
>
>>Hmm, ok, for me it's the docid's themselves that are important.
>>If the offset value is within range, I suppose I can't easily reverse
>>the equation to get out the original docid value, right?
>
>
> It's easy - just:
>
> did_raw = (did_merged - 1) / number_of_databases + 1
>
> offset = did_merged % number_of_databases
>
> where % is modulus (like in C).
I suppose given that the two db's don't have conflicting id's, that
executing the query twice on the two db's separately to collect the
docids I need might actually be simpler/quicker than combining them and
then doing an equation to get each true docid?
Eric
More information about the Xapian-discuss
mailing list