[Xapian-discuss] PHP Binding and SWIG Director for XapianMatchDecider

Yoann Maheo ymaheo at hexaglobe.com
Sat Feb 12 13:15:23 GMT 2011

  Le 12/02/2011 14:02, Andrew Betts a écrit :
> Hi Yohann,
> I use the PHP bindings too, and this error is a common one that normally means you have attempted to invoke a method with an invalid combination of argument types.  The documentation for get_mset seems to suggest that if you are going to include a matchdecider argument you also need an RSet value before it.
> http://xapian.org/docs/apidoc/html/classXapian_1_1Enquire.html#edb5fb761acc0bb2249bec375883a093

Hi !

Thanks for your answer, I try with a valid instance of Rset, and it's 
not working better.

It seems that Swig PHP Directors (converting PHP Objects to Cpp Objects) 
is not activated, because of a bug in Swig :

"The only remaining issue seems to be that SWIG's PHP director support
doesn't handle directed methods which take an object as a parameter - the
subclassed method gets a PHP resource without its object wrapper."

So if PHP object is not converted, the instance in parameter is not 
correct (not a Cpp object), causing the error message of "No matching 

I would like to know if this bug is fixed and if PHP Director can be 
actived in Xapian binding.

> I'm also unsure whether null is a valid value to pass in the checkatleast argument.  Since you want up to 3000 results, you might want to set that value to some number higher than 3000.
I don't undestand the last sentence.

Thanks a lot !
Yoann Maheo

More information about the Xapian-discuss mailing list