java-user@lucene.apache.org
[Top] [All Lists]

Re: regarding range search

Subject: Re: regarding range search
From: "Narednra Singh Panwar"
Date: Tue, 12 Jun 2007 13:05:04 +0530
Use NumberTools.longToString() while  storing it in to lucene index and use
(double)NumberTools.stringToLong() while reading it from Lucene index.
Hope this will solve your problem.

Thanks
Narendra

On 6/12/07, Mohammad Norouzi <mnrz57@xxxxxxxxx> wrote:

Hello
consider a query like this

patientResult:[8 TO 9]

this returns correct documents but

patientResult:[8 TO 10]

return nothing. and also this range [0.1 TO 10]  returns results like 11,
10.8, 10.9 etc.

is there any tricky way or workaround to obtain correct results? I know
lucene compares them as string but how to resolve the problem

thank you very much in advance


--
Regards,
Mohammad
--------------------------
see my blog: http://brainable.blogspot.com/
another in Persian: http://fekre-motefavet.blogspot.com/

<Prev in Thread] Current Thread [Next in Thread>