: As Gwyn pointed out, that would make -3 > -2.   Personally, I'd use
: unsigned numbers and shift the range -- for 16 bit numbers I'd map
: -32768..32767 to 0..65535 by adding 32768.  I guess you could do that by
: having overriding getRangeQuery() (LIA, p207 -- wonderful book).

there are a lot of different techniques for encoding numeric values as
lexigraphically ordered strings, finding the right soluation for any
given case depends mainly on what hte scope of your values is -- if
you're only ever dealing with the numbers 1-10, there are some really
easy options.  If you want something that can handle any "long" take a
look at the NumberTools class in SVN.  Even if what you want is something
that can handle any int, the technique used in that class can be still be
applied.


As for the query parsing aspect -- subclassing and overriding the
getRangeQuery method to know which fields to encode using your method of
choice is the very easy to do.


-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to