[Xapian-discuss] Re: php5 new_BM25Weight() function error
Sungsoo Kim
xingshou at gmail.com
Wed Jun 20 14:22:31 BST 2007
Thanks Olly!
It really works after change according to your guide.
Sungsoo Kim
"Olly Betts" <olly at survex.com> wrote in message news:20070620113501.GJ19937 at survex.com...
On Wed, Jun 20, 2007 at 07:25:38PM +0900, Sungsoo Kim wrote:
> I am using PHP 5.1 and get the following error always.
>
> [code]
> $enquire->set_weighting_scheme(new XapianBM25Weight(1, 0, 1, 0, 0));
It works if you write:
$enquire->set_weighting_scheme(new XapianBM25Weight(1.0, 0.0, 1.0, 0.0, 0.0));
SWIG implements overload dispatch based on the PHP type so if a C++
method takes a double, you currently have to pass a floating point value
in PHP.
Ideally it would allow and convert an integer in cases like this where
there's no overload ambiguity, since such strict type requirements
aren't natural in PHP, but currently that doesn't happen.
Cheers,
Olly
More information about the Xapian-discuss
mailing list