hi all.

  am indexing a price field by 

doc.add(new Field("price", "1450", Field.Store.YES,
                                        Field.Index.TOKENIZED));
doc.add(new Field("price", "3800", Field.Store.YES,
                                        Field.Index.TOKENIZED));
doc.add(new Field("price", "2500", Field.Store.YES,
                                        Field.Index.TOKENIZED));
doc.add(new Field("price", "7020", Field.Store.YES,
                                        Field.Index.TOKENIZED));
doc.add(new Field("price", "3500", Field.Store.YES,
                                        Field.Index.TOKENIZED));


its done properly. 

when i go for search am using 

                IndexSearcher searcher = new IndexSearcher(indexDir);

                Analyzer analyzer = new StandardAnalyzer();

                QueryParser parser = new QueryParser("contents", analyzer);
                Query query = parser.parse(qryStr);

                Hits hits = searcher.search(query);

and my query is to search is price:[1000 TO 4000]. when i search this, it
returns nothing or when i change the query to price:[2000 TO 4000] it return
all hits. where am wrong.. am not getting any correct output. could any1
help me out of this. please....
-- 
View this message in context: 
http://www.nabble.com/Number-range-search-tp18960121p18960121.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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

Reply via email to