lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Bazhenov <dot...@gmail.com>
Subject Re: posting list traversal code
Date Thu, 13 Jun 2013 04:33:14 GMT
I'm not quite sure, what you really need. But as far as I understand, you want to get all document
id's for a given term. If so, the following code will work for you:

Term term = new Term("fieldName", "fieldValue");
TermDocs termDocs = indexReader.termDocs(term);
while (termDocs.next()) {
	int docId = termDocs.doc();
	// work with the document...
}
On Jun 13, 2013, at 1:56 PM, Sriram Sankar <sankar@gmail.com> wrote:

> Can someone point me to the code that traverses the posting lists?  I
> trying to understand how it works.
> 
> Thanks,
> 
> Sriram

---
Denis Bazhenov <dotsid@gmail.com>






---------------------------------------------------------------------
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