[Xapian-discuss] PHP and Enquire_get_eset
Olly Betts
olly at survex.com
Fri Dec 15 01:05:12 GMT 2006
On Thu, Dec 14, 2006 at 04:17:18PM -0600, InsaneToucan wrote:
> 44 Enquire_set_query($enquire, $query);
> 45 $matches = Enquire_get_mset($enquire, 0, 10);
> 46 $e = Enquire_get_eset($enquire,1,10,0,1,null);
This style of calling is deprecated (but I failed to update the
examples for 0.9.9).
But the main thing wrong here is that the second proper argument needs
to be an RSet, but you're passing "10". There's also no need to pass
in the default values for all the different optional parameters. You
want some code like this:
$rset = new XapianRSet();
// Now add at least one docid to $rset like so:
$rset->add_document($matches->begin()->get_docid());
$eset = $enquire->get_eset(10, $rset);
Cheers,
Olly
More information about the Xapian-discuss
mailing list