[Xapian-discuss] overlapping docids when searching on multiple databases?

Olly Betts olly at survex.com
Fri Oct 22 11:53:26 BST 2010


On Fri, Oct 22, 2010 at 12:31:53PM +0200, Per Jessen wrote:
> Sanity check - as long as my two databases are combined in the right
> order, I can use the combined docid to retrieve a document from the
> combined database, right? 
> 
> Sequence of events:  
> open&combine databases, 
> do a search, 
> cache list of docids, 
> done.
> 
> elsewhere, microseconds later:
> open&combine databases, 
> retrieve cached list of docids,
> retrieve individual documents by docid.

Yes.

This is why we interleave rather than adding an offset to the second and
subsequent databases - it means documents can be added and/or removed from
the individual databases and the docids of existing documents in the combined
database stay the same.

Omega uses this property for marking documents for relevance feedback, or
finding "more like" a particular document.

Cheers,
    Olly



More information about the Xapian-discuss mailing list