Bill Crawford
2007-Feb-12 15:15 UTC
[Xapian-discuss] How do I get the document ID while scanning through $enquire->matches() (in perl)?
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? -- http://www.lost.eu/175db
Richard Boulton
2007-Feb-12 15:55 UTC
[Xapian-discuss] How do I get the document ID while scanning through $enquire->matches() (in perl)?
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; -- Richard
James Aylett
2007-Feb-12 15:58 UTC
[Xapian-discuss] How do I get the document ID while scanning through $enquire->matches() (in perl)?
On Mon, Feb 12, 2007 at 03:28:42PM +0000, Richard Boulton wrote:> >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;In Perl? :) J -- /--------------------------------------------------------------------------\ James Aylett xapian.org james@tartarus.org uncertaintydivision.org