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: u...@thetaphi.de


> -----Original Message-----
> From: manalgandhi [mailto:manalgan...@yahoo.com]
> Sent: Wednesday, February 19, 2014 2:58 PM
> To: java-user@lucene.apache.org
> 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: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org


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

Reply via email to