@Override public int docID() { return postingsEnum.docID(); }
@Override public int docID() { return in.docID(); }
@Override public int docID() { return docsQueue.top().docID(); }
@Override public float score() throws IOException { assert docID() != DocIdSetIterator.NO_MORE_DOCS; return docScorer.score(postingsEnum.docID(), postingsEnum.freq()); }
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()); }
++n; Document doc = reader.document(postsIter.docID(), CHECK_FIELDS); if (doc == null) { LOGGER.log(Level.FINER, "No Document: {0}", path);
@Override public int freq() throws IOException { int doc = docID(); if (doc == posQueueDoc) { return freq; } freq = 0; started = false; posQueue.clear(); for (PostingsAndPosition pp : subs) { if (pp.pe.docID() == doc) { pp.pos = pp.pe.nextPosition(); pp.upto = pp.pe.freq(); posQueue.add(pp); freq += pp.upto; } } return freq; }
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; }
@Override public int freq() throws IOException { int doc = docID(); if (doc != posQueueDoc) { posQueue.clear(); for (PostingsEnum sub : subs) { if (sub.docID() == doc) { int freq = sub.freq(); for (int i = 0; i < freq; i++) { posQueue.add(sub.nextPosition()); } } } posQueue.sort(); posQueueDoc = doc; } return posQueue.size(); }
@Override public int docID() { return postings.docID(); }
@Override public float score() throws IOException { return payloadBoost() * docScorer.score(postings.docID(), postings.freq()); }
private void reset() throws IOException { if (pe.docID() == NO_MORE_DOCS) { upto = -1; pos = NO_MORE_INTERVALS; } else { upto = pe.freq(); pos = -1; } }