[Xapian-discuss] PHP and Enquire_get_eset

James Aylett james-xapian at tartarus.org
Fri Dec 15 17:30:09 GMT 2006


On Fri, Dec 15, 2006 at 11:22:54AM -0600, InsaneToucan wrote:

> Message got cut off, I tried:
> 
>        $rset = new XapianRSet();
>        $rset->add_document($mseti->get_docid());
>        $eset = $enquire->get_eset(10, $rset);
>        $sets = $eset->begin();
>        foreach($sets as $val) {
>                var_dump($val);
>        }
> 
> Which just outputs:
> 
> Performing query `Xapian::Query(php)'
> 8 results found
> <snip>
> resource(21) of type (_p_Xapian__ESetIterator)
> 
> I simply want to get the related terms.

$val in your foreach loop is a wrapped Xapian::ESetIterator. In the
wrapping, run get_termname() to get the relevant term:

foreach ($sets as $val) {
	var_dump($val->get_term_name());
}

J

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james at tartarus.org                               uncertaintydivision.org



More information about the Xapian-discuss mailing list