lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Hardiker <dhardi...@adaptavist.com>
Subject Re: Numerical Range Query
Date Wed, 14 May 2008 14:42:38 GMT
Erick Erickson wrote:
> Are you using NumberTools both at index and query time? Because
> this works exactly as I expect....

Yes, the code I posted showed the usage of NumberTools -- here it is 
from my 2nd reply:

>> Taking your advice I'm now indexing using:
>>
>> document.add( new Field(RateUtils.SF_FILTERED_CNT,
>> NumberTools.longToString( filteredCount ), Field.Store.YES,
>> Field.Index.UN_TOKENIZED) );
>>
>> and searching using:
>>
>> I'm now
>> int minRates = Long.valueOf( minRatesString ).intValue();
>> luceneQuery.add( new ConstantScoreRangeQuery( RateUtils.SF_FILTERED_CNT,
>> NumberTools.longToString(minRates), "", true, false ),
>> BooleanClause.Occur.MUST );

I'll take your code and use it to create a comparative index which I can 
use Luke to see where the differences are.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message