[Xapian-discuss] How do I get the document ID while scanning through $enquire->matches() (in perl)?

Richard Boulton richard at lemurconsulting.com
Mon Feb 12 15:28:42 GMT 2007

Bill Crawford wrote:
> I have a set of results (via ->matches()) from a query, and each element of 
> that is apparently returned as an MSetIterator. Thing is, I can't for the 
> life of me see how to get the actual docid from the results (I'm pulling out 
> the rank, weight, and so on, but can't see a method to get the docid).
> What am I missing?

Use operator* to get the docid: from enquire.h:

         /// Get the document ID for the current position.
         Xapian::docid operator*() const;


More information about the Xapian-discuss mailing list