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

Per Jessen per at computer.org
Fri Oct 22 11:31:53 BST 2010


Per Jessen wrote:

> Richard Boulton wrote:
> 
>> On 22 October 2010 09:32, Per Jessen <per at computer.org> wrote:
>>> Just a quick question - it seems to me that it's entirely possible
>>> to get overlapping docids when searching on multiple databases?  For
>>> instance:
>> 
>> This doesn't happen, because the document IDs presented by a
>> multi-database are formed by interleaving the document IDs from the
>> sub-databases.
>> In your example, you'll be able to access one of the documents as
>> docid 19, and one as docid 20.
>> 
>> For details of how to convert from the docid in a multi database to
>> the docid in the sub-database, see:
>> http://trac.xapian.org/wiki/FAQ/MultiDatabaseDocumentID
> 
> Thank you, that was very helpful.

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.


/Per Jessen, Zürich




More information about the Xapian-discuss mailing list