[Xapian-discuss] Enquire set_cutoff problem

Olly Betts olly at survex.com
Tue Mar 18 02:56:56 GMT 2008


On Mon, Mar 17, 2008 at 12:42:21PM +0100, Donato Di Leo wrote:
> I found out the problem ...
> I wrote the cutoff value as decimal value like 70.0 and in this way the 
> procedure doesn't work

Yes, this isn't totally ideal but is a consequence of how SWIG
implements overloading by type in PHP, which doesn't support such
overloading directly.

Perhaps an integer parameter should accept either an integer or floating
point argument if there are no ambiguous overloads (as here).

> If I write 70 (integer value) the procedure works fine

I'm glad you've resolved your problem, but as a general tip, please
report code that doesn't work *exactly as you tried it*.  All we have
to go on when you report a problem is the information you give, so if
that isn't correct, it is so much harder to help.

You said you had tried this:

  $enquire->set_cutoff(70);                                                     

If instead you'd said you'd tried it with 70.0, we'd have been able to
resolve your problem right away.

Cheers,
    Olly



More information about the Xapian-discuss mailing list