[Xapian-discuss] xapian perl bindings: aborted on numbers
Olly Betts
olly at survex.com
Tue Jul 1 10:05:54 BST 2008
On Thu, Jun 19, 2008 at 02:00:21PM +0900, Josef Novak wrote:
> I went ahead and rebuilt all of indexes from scratch and now the
> problem seems to have disappeared. I used exactly the same scripts,
> so I'm a bit confused as to what could possibly be different.
The "query from a list of terms" constructor does currently use SvPOK()
which will reject perl scalars which aren't represented as a string
internally. But this should only mean that you can't use a number
which was expressed as a number - strings which happen to consist
entirely of digits should be fine.
And my understanding is that in this example Perl will store 2004 as a
string:
@terms = qw / who won the 2004 superbowl /
But perhaps that check doesn't make sense anyway. Looking at the
history, it's been there since the code was added in 0.8.0.1, but
Perl will coerce the value to a string if necessary, and in general
it doesn't distinguish between numbers and strings like this.
So I'm going to remove that check anyway, but I'm not sure if it is
actually related to your issue.
Cheers,
Olly
More information about the Xapian-discuss
mailing list