Re: RangeQuery on Numeric values

2004-07-23 Thread Stephane James Vaucher
This might help:

http://wiki.apache.org/jakarta-lucene/SearchNumericalFields

sv

On Fri, 23 Jul 2004, Terence Lai wrote:

> Hi,
>
> 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?
>
> Thanks,
> Terence
>
>
>
>
> --
> Get your free email account from http://www.trekspace.com
>   Your Internet Virtual Desktop!
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



Re: RangeQuery on Numeric values

2004-07-23 Thread Daniel Naber
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 "" to 
"1000".

Daniel


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



RangeQuery on Numeric values

2004-07-23 Thread Terence Lai
Hi,

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?

Thanks,
Terence




--
Get your free email account from http://www.trekspace.com
  Your Internet Virtual Desktop!

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