Jim Lynch | 20 Jan 17:00 2012

get_docid???

     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  <at> INC ( <at> 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).

(Continue reading)

Jim Lynch | 20 Jan 17:29 2012

Re: get_docid???

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  <at> INC ( <at> 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).
(Continue reading)

Olly Betts | 21 Jan 02:15 2012

Re: get_docid???

On Fri, Jan 20, 2012 at 11:00:07AM -0500, Jim Lynch wrote:
> [Fri Jan 20 10:35:06 2012] newmail.cgi: Can't locate  
> auto/Search/Xapian/Document/get_docid.al in  <at> INC ( <at> 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).

The XS bindings need someone to add a wrapper by hand for new C++ methods.
Nobody has added a wrapper for this method, and the "Can't locate
<something>.al" is the cryptic way Perl responds to calling a
non-existing method in this case.

It's trivial to add a wrapper in this case, and I've done so in SVN 1.2
branch (r16334), so this will be fixed in 1.2.9.

(Continue reading)

Jim Lynch | 21 Jan 10:26 2012

Re: get_docid???

On 01/20/2012 08:15 PM, Olly Betts wrote:
> On Fri, Jan 20, 2012 at 11:00:07AM -0500, Jim Lynch wrote:
>> [Fri Jan 20 10:35:06 2012] newmail.cgi: Can't locate
>> auto/Search/Xapian/Document/get_docid.al in  <at> INC ( <at> 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).
> The XS bindings need someone to add a wrapper by hand for new C++ methods.
> Nobody has added a wrapper for this method, and the "Can't locate
> <something>.al" is the cryptic way Perl responds to calling a
> non-existing method in this case.
>
> It's trivial to add a wrapper in this case, and I've done so in SVN 1.2
> branch (r16334), so this will be fixed in 1.2.9.
>
(Continue reading)

Olly Betts | 21 Jan 10:56 2012

Re: get_docid???

On Sat, Jan 21, 2012 at 04:26:41AM -0500, Jim Lynch wrote:
> Thanks, but I'm just a little confused.  I thought all we had today were  
> SWIG generated Perl bindings??

No.  Search::Xapian is hand-coded XS in 1.2.x (and earlier).  Since
1.2.4 there are also SWIG-generated Perl bindings in xapian-bindings,
but we decided to make the final switch with a new release series, as
it may cause minor incompatibilities with existing Perl code which uses
Xapian.

Cheers,
    Olly

Gmane