On Jan 23, 2006, at 10:38 AM, Gwyn Carwardine wrote:
Two queries about ranges:
1. field:[a TO z] does not return the same as field:[z TO a]
I think it should. The standard QueryParser or even the range query
should
ascertain the lowest and highest and switch them around if necessary
This is quite debatable. I personally don't think the ends of the
ranges should be swapped when the left one is greater than the right
one. The word "TO" indicates the user is supplying the ends already
in order.
But if the consensus was to adjust it, I wouldn't object.
2. How do I search for negative numbers in a range. For example
field:[-3 TO
2] ?
I don't mind hacking code such that my numbers are indexed as
+00000001 and
-00000001 and then I can override the query parser to change my
query to
[-0000003 TO +0000002]. However.. "+" is less then "-" in Ascii
terms so a
range search isn't going to work terrifically well.. Is there a
standard
approach??
You could leave the "+" off for positive numbers. That'd do the
trick, right? "-" < "0" lexicographically.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]