Hi, DocValues are not made for this type of usage. The standard Lucene inverted Index is optimized to do that: Lookup the term in TermsEnum and get DocsEnum from it, which lists all doc ids. If you still want to misuse docvalues to do the lookup, you have to iterate from the first to the last document and compare each document's docvalue with the expected one to find all documents.
Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: [email protected] > -----Original Message----- > From: manalgandhi [mailto:[email protected]] > Sent: Wednesday, February 19, 2014 2:58 PM > To: [email protected] > Subject: Lucene - Get docId or document by using the DocValue > > Hi, > > Say the docValue of a particular field is known. Is it possible to get the > list of > docId that match the DocValue from the index? > > I'm using Lucene 4.6.0. > > Regards, > Manal > > > > -- > View this message in context: http://lucene.472066.n3.nabble.com/Lucene- > Get-docId-or-document-by-using-the-DocValue-tp4118248.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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
