lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: Lucene - Get docId or document by using the DocValue
Date Wed, 19 Feb 2014 14:42:49 GMT
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: uwe@thetaphi.de


> -----Original Message-----
> From: manalgandhi [mailto:manalgandhi@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-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


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


Mime
View raw message