[Xapian-discuss] Searching subset of documents

Rusty Conover rconover at infogears.com
Thu Jun 1 10:13:54 BST 2006


Hi All,

I have a reasonably large Xapian database of documents where I want  
perform a search on a subset of documents in the database.    What is  
the preferred method of doing this?

The subset of documents to be searched is not nicely able to be  
defined with boolean fields. Currently I'm running a query in an  
external database which returns the Xapian document ids where that  
the Xapian query should be matched.

I've written code so that custom decider functions can be passed to  
get_mset() in Search::Xapian, but doesn't appear to be able to do the  
job.  Because the decider function isn't passed the document id, just  
the document object itself.  I suppose this is because the document  
id appears to be munged with the number of active databases currently  
being searched, to ensure uniqueness across all databases.  Would it  
be best to just store a unique id as a value in each document, then  
just test that id with the custom decider function?

Is there a more efficient way to go about this, where the document  
list could be filtered before the term matcher goes to work?  Does it  
really make a difference with regard to order?

Cheers,

Rusty
--
Rusty Conover
InfoGears Inc.
Web: http://www.infogears.com






More information about the Xapian-discuss mailing list