@Override public int nextDoc() throws IOException { return in.nextDoc(); }
@Override public int nextDoc() throws IOException { while(true) { if (current == null) { if (upto == numSubs-1) { return this.doc = NO_MORE_DOCS; } else { upto++; current = subs[upto].postingsEnum; currentBase = subs[upto].slice.start; } } final int doc = current.nextDoc(); if (doc != NO_MORE_DOCS) { return this.doc = currentBase + doc; } else { current = null; } } }
@Override public int nextDoc() { try { return postings.nextDoc(); } catch (IOException ioe) { throw new RuntimeException(ioe); } } }
@Override public int nextDoc() throws IOException { doc = postings.nextDoc(); if (doc != DocIdSetIterator.NO_MORE_DOCS) { freq = postings.freq(); assert freq >= 1; count = 0; } position = -1; return doc; }
@Override public int advance(int target) throws IOException { assert target > doc; while(true) { if (current != null) { final int doc; if (target < currentBase) { // target was in the previous slice but there was no matching doc after it doc = current.nextDoc(); } else { doc = current.advance(target-currentBase); } if (doc == NO_MORE_DOCS) { current = null; } else { return this.doc = doc + currentBase; } } else if (upto == numSubs-1) { return this.doc = NO_MORE_DOCS; } else { upto++; current = subs[upto].postingsEnum; currentBase = subs[upto].slice.start; } } }
private int getDocumentFrequency(final IntsHolder documentIds, final int docBase, final PostingsEnum postingsEnum) throws IOException { int weight = 0; while (postingsEnum.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) { if (documentIds.has(docBase + postingsEnum.docID())) { weight++; } } return normalizeDocumentFrequency(weight, documentIds.numberOfElements()); }
@Override public int nextDoc() throws IOException { PostingsEnum top = docsQueue.top(); int doc = top.docID(); do { top.nextDoc(); top = docsQueue.updateTop(); } while (top.docID() == doc); return top.docID(); }
while (postsIter.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) { ++n;
assert delDocLimit < PostingsEnum.NO_MORE_DOCS; while (true) { int doc = postingsEnum.nextDoc(); if (doc < delDocLimit) { if (state.liveDocs == null) {
private int getPhraseScore(final ComplexQueryData data, final int docBase, final PostingsEnum postingsEnum) throws IOException { int weight = 0; while (postingsEnum.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) { int docId = postingsEnum.docID(); if (data.documentIds.has(docBase + docId)) { IntsHolder positions = data.scorer.getPositions(docBase + docId); if (positions == null) { continue; } int freq = postingsEnum.freq(); for (int i = 0; i < freq; i++) { int pos = postingsEnum.nextPosition(); if (positions.has(pos)) { weight++; } } } } return weight; }
int doc = postingsEnum.nextDoc(); if (doc == DocIdSetIterator.NO_MORE_DOCS) { break;
long totalTermFreq = 0; while(true) { final int doc = postings.nextDoc(); if (doc == DocIdSetIterator.NO_MORE_DOCS) { break; final int nextDocID = postings.nextDoc(); if (nextDocID == DocIdSetIterator.NO_MORE_DOCS) { break; throw new RuntimeException("term " + term + ": advance(docID=" + skipDocID + ") returned docID=" + docID); final int nextDocID = postings.nextDoc(); if (nextDocID == DocIdSetIterator.NO_MORE_DOCS) { break; PostingsEnum d = termsEnum.postings(null, PostingsEnum.NONE); int docFreq = 0; while (d.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) { docFreq++;
final int doc = postings.nextDoc();
while ((docID = postingsEnum.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
long totalTermFreq = 0; while (true) { int docID = postingsEnum.nextDoc(); if (docID == PostingsEnum.NO_MORE_DOCS) { break;
assert docsAndPositionsEnum != null; final int docID = docsAndPositionsEnum.nextDoc(); assert docID != DocIdSetIterator.NO_MORE_DOCS; assert docsAndPositionsEnum.freq() == freq;
assert docsAndPositionsEnum != null; final int docID = docsAndPositionsEnum.nextDoc(); assert docID != DocIdSetIterator.NO_MORE_DOCS; assert docsAndPositionsEnum.freq() == freq;
int doc; int i = 0; while ((doc = in.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) { if (i == docs.length) { final int newLength = ArrayUtil.oversize(i + 1, 4);