lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <>
Subject intersection of two posting lists
Date Fri, 08 May 2015 15:53:33 GMT
Hello All,

I am traversing posting list of a single term by following code. (not sure if there is a better
Now I need to handle/aggregate multiple terms. Traverse intersection of multiple posting lists
and obtain summed freq() of multiple terms per document. What is the easiest way to obtain
these statistics? Is there an api/method to do that?

Term term = new Term(field, word);
Bits bits = MultiFields.getLiveDocs(reader);
PostingsEnum postingsEnum = MultiFields.getTermDocsEnum(reader, bits, field, term.bytes());

while (postingsEnum.nextDoc() != PostingsEnum.NO_MORE_DOCS) {


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message