[Xapian-discuss] Re: strange problem with number value range in
1.0.4
Adam Sjøgren
asjo at koldfront.dk
Thu Dec 20 14:56:43 GMT 2007
On Thu, 15 Nov 2007 10:23:22 +0000, Olly wrote:
> On Wed, Nov 14, 2007 at 03:51:52PM -0500, Jim Spath wrote:
>> test 20071113153701..20071114153701
>> Xapian::Query((Ztest:(pos=1) FILTER VALUE_RANGE 0 àJäw)@ àJèG¹@))
> NumberValueRangeProcessor expects the value to be encoded with
> Xapian::sortable_serialise(). Otherwise the string compare which
> is used means that 123 < 20 < 3!
Is Xapian::sortable_serialise() wrapped in Search::Xapian?
It didn't seem so when I tried it just now (1.0.4.0-2 from Debian
unstable) - which means that NumberValueRangeProcessor is not that
usable if you index from Perl, right?
>> I am using the Search::Xapian perl module to do the searching, and omega
>> scriptindex tool to build the index.
> I don't think scriptindex supports encoding with sortable_serialise()
> currently. But if your timestamps are always fixed length strings then
> you could just use StringValueRangeProcessor.
I was trying to use StringValueRangeProcessor, but the constructor does
not take a prefix (as opposed to NumberVRP), so I can only have one
"rangeable" value, which is too little in my case.
Should I try figuring out how to wrap sortable_serialise, or should I
try to provide a patch for StringVRP that adds the str and prefix
arguments, similar to NumberVRP?
Best regards,
Adam
--
"Your father traded the tools for M&Ms again" Adam Sjøgren
asjo at koldfront.dk
More information about the Xapian-discuss
mailing list