To get the value you have to enable storing the NumericField. By default it is only indexed: new NumericField(name, Field.Store.YES, true). You can then get back the value as string with doc.get(name) from search results - or since Lucene 3.4 as Number instance: ((NumericField) doc.getFieldable(name)).getNumericValue().intValue()
----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: gubs [mailto:gub...@gmail.com] > Sent: Thursday, December 08, 2011 5:47 PM > To: general@lucene.apache.org > Subject: RE: indexSearcher using NumericRangeQuery doesn't gives result. Any > help ? > > HI Uwe, > > Thanks for your reply. I followed the same stuffs as suggested by you in the NF > and NRQ object creation. Still, i can see the count of the hits in docs. > But, not able to fetch the value successfully and print it. Do you see any other > ways to get the value from the docs ? > > Gubs > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/indexSearcher-using- > NumericRangeQuery-doesn-t-gives-result-Any-help-tp3569338p3570762.html > Sent from the Lucene - General mailing list archive at Nabble.com.