[Xapian-discuss] get_docid???
Jim Lynch
jim at fayettedigital.com
Fri Jan 20 16:29:44 GMT 2012
On 01/20/2012 11:00 AM, Jim Lynch wrote:
> my $mset = $enq->get_mset($nstart,$nrecords);
>
> for(my $mit=$mset->begin(); $mit != $mset->end();$mit++) {
>
> my $doc = $mit->get_document();
> my $dat = $doc->get_data();
> my $id = $doc->get_docid();
> }
>
> [Fri Jan 20 10:35:06 2012] newmail.cgi: Can't locate
> auto/Search/Xapian/Document/get_docid.al in @INC (@INC contains:
> /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1
> /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10
> /usr/share/perl/5.10 /usr/local/lib/site_perl .) at newmail.cgi line 286
>
> From the api at
> http://xapian.org/docs/apidoc/html/classXapian_1_1Document.html
>
> docid Xapian::Document::get_docid ( ) const
>
> Get the document id which is associated with this document (if any).
>
> NB If multiple databases are being searched together, then this will
> be the document id in the individual database, not the merged database!
>
> Returns:
> If this document came from a database, return the document id in
> that database. Otherwise, return 0 (in Xapian 1.0.22/1.2.4 or later;
> prior to this the returned value was uninitialised).
>
>
> CPAN: Module::CoreList loaded ok (v2.18)
> Search::Xapian is up to date (1.2.8.0).
>
> I think the libraries are still at 1.2.7.
>
> Any ideas?
>
> Jim.
>
> _______________________________________________
> Xapian-discuss mailing list
> Xapian-discuss at lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-discuss
>
I think I answered my own question. I found the docs for the old XS (or
that's what the man page says) interface and it's using a different
method of getting matches using
my @matches = $enq->matches(0, 10);
And each element of the array has a get_docid method.
Docs found at: http://xapian.org/docs/bindings/perl/Search/Xapian.html
Are there newer? This mentions sortable_serialize.
Jim.
More information about the Xapian-discuss
mailing list