[Xapian-discuss] strange problem with number value range in 1.0.4
Jim Spath
jspath at pangeamedia.com
Thu Nov 15 14:20:51 GMT 2007
Olly Betts wrote:
> On Wed, Nov 14, 2007 at 03:51:52PM -0500, Jim Spath wrote:
>> The first line is the query string being passed to the query parser, and
>> the second line is resulting query description.
>>
>> 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!
>
> In 1.0.0, NumberValueRangeProcessor had a broken design where it just
> used a string compare like this, but we did quickly realise and warn
> people not to use it until it was fixed.
>
>> 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.
StringValueRangeProcessor works for me!
Thanks again Olly.
More information about the Xapian-discuss
mailing list