Hello, I tried to modify the simplesearch.php example file to get an expanded terms set like this: 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); I added line 46. Running it on the CLI I get the following error: $ php simplesearch.php /var/data/xapian "mail" Performing query `Xapian::Query(mail)' Fatal error: No matching function for overloaded 'Enquire_get_eset' in /var/www/john/htdocs/simplesearch.php on line 46 I've tried approaching and solving this problem by looking through the SWIG source and the only reason I can see this error being invoked is by not getting enough arguments, 6 in this case. However, in the same code it looks like it should work even with <6 && >2 arguments (function starting @ line 10990 in php5/xapian_wrap.cc). If somebody could shed some light on this issue that'd be appreciated. TIA, InsaneToucannnnnnnn
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