[Xapian-discuss] PHP and Enquire_get_eset
InsaneToucan
insanetoucan at gmail.com
Fri Dec 15 17:12:17 GMT 2006
That was it. To help the little itty bit that I can w/this project, I
modified simplesearch.php to use that new OO syntax, see attached.
Touching back on XapianEnquire, I don't quite see how to use it to get the
relevancy feedback like related search terms. I tried the following:
$rset = new XapianRSet();
$rset->add_document($mseti->get_docid());
$eset = $enquire->get_eset(10, $rset);
$sets = $eset->begin();
foreach($sets as $val) {
On 12/15/06, Olly Betts <olly at survex.com> wrote:
>
> On Fri, Dec 15, 2006 at 01:35:03AM -0600, InsaneToucan wrote:
> > Fatal error: Call to a member function get_eset() on a non-object in
> > simplesearch.php on line 56
>
> This is because $enquire wasn't created using "new XapianEnquire()" but
> with "new_Enquire()", so it's not a PHP object. You need to convert
> the script to using the new OO syntax (or use the old non-OO syntax
> everywhere, but that's deprecated so I don't recommend doing so).
>
> There's a script to do most of the tedious work of converting. See
> here for the script and some more explanation:
>
> http://thread.gmane.org/gmane.comp.search.xapian.general/3561/focus=3562
>
> Cheers,
> Olly
>
More information about the Xapian-discuss
mailing list