Re: search with RangeFilter.Less

2006-06-28 Thread Chris Hostetter
: I'm trying to do a numerical search for a property in Lucene using : RangeFilter.Less : Field("id","property",Field.Store.YES,Field.Index.TOKENIZED) ); :doc.add( new : Field("num",NumberTools.longToString(5L),Field.Store.YES,Field.Index.TOK : ENIZED) ); : Since five is less than ten,

Re: search with RangeFilter.Less

2006-06-28 Thread Peter W .
Jason, Thanks, but changing it to '05' or '05L' in the code didn't seem to work, hits.length() still returns 0 when the document should be found. If you make just one change in the example: Hits hits = searcher.search(query); //Hits hits = searcher.search(fq); IndexSearcher finds

Re: search with RangeFilter.Less

2006-06-28 Thread Jason Pump
It's a string comparison. Make the "5" a "05" would be a simple workaround. Jason Peter W. wrote: Hello, I'm trying to do a numerical search for a property in Lucene using RangeFilter.Less without using both RangeQuery and test cases. Here's the code that I expect would return one hit : (ad

search with RangeFilter.Less

2006-06-28 Thread Peter W .
Hello, I'm trying to do a numerical search for a property in Lucene using RangeFilter.Less without using both RangeQuery and test cases. Here's the code that I expect would return one hit : (adapted from Youngho) import org.apache.lucene.analysis.SimpleAnalyzer; import org.apache.lucene.docu