Hello All,
I am traversing posting list of a single term by following code. (not sure if
there is a better way)
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) {
postingsEnum.freq();
postingsEnum.docID()}
Thanks,
Ahmet
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]