On Friday 23 July 2004 16:58, Terence Lai wrote:

> I am currently using Lucene 1.4 Final. I want to construct a query that
> matches a numeric range. I believe that the RangeQuery defined in Lucene
> API uses the string comparision. It does not work for numeric contents.
> Does anyone know how to create a numeric range query?

RangeQuery works for numbers, too, but you have to store them in the index so 
they are sorted correctly when sorted alphabetically. For example, if your 
numbers are between 0 and 1000 you have to store them as strings "0000" to 
"1000".

Daniel


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

Reply via email to