@Override public boolean advanceExact(int doc) throws IOException { assert scorer.docID() == doc; return true; } };
@Override public final int docID() { return in.docID(); }
@Override public int docID() { return reqScorer.docID(); }
@Override public float score() throws IOException { int doc = in.docID(); if (doc != curDoc) { curScore = in.score(); curDoc = doc; } return curScore; }
@Override public int score(LeafCollector collector, Bits acceptDocs, int min, int max) throws IOException { collector.setScorer(scorer); if (scorer.docID() == -1 && min == 0 && max == DocIdSetIterator.NO_MORE_DOCS) { scoreAll(collector, iterator, twoPhase, acceptDocs); return DocIdSetIterator.NO_MORE_DOCS; } else { int doc = scorer.docID(); if (doc < min) { if (twoPhase == null) { doc = iterator.advance(min); } else { doc = twoPhase.approximation().advance(min); } } return scoreRange(collector, iterator, twoPhase, acceptDocs, doc, max); } }
/** Returns the score of the current document matching the query. * Initially invalid, until the {@link #iterator()} is advanced the first time. * @return The score of the required scorer, eventually increased by the score * of the optional scorer when it also matches the current document. */ @Override public float score() throws IOException { // TODO: sum into a double and cast to float if we ever send required clauses to BS1 int curDoc = reqScorer.docID(); float score = reqScorer.score(); int optScorerDoc = optIterator.docID(); if (optScorerDoc < curDoc) { optScorerDoc = optIterator.advance(curDoc); } if (optScorerDoc == curDoc) { score += optScorer.score(); } return score; }
@Override public int docID() { return scorer.docID(); }
@Override public int docID() { return in.docID(); }
int actualDoc = scorer.docID(); if (actualDoc < targetDoc) { actualDoc = scorer.iterator().advance(targetDoc);
@Override public int docID() { return currentContextScorer.docID(); }
/** * {@inheritDoc} */ public int docID() { return childScorer.docID(); }
@Override public float score() throws IOException { int doc = in.docID(); if (doc != curDoc) { curScore = in.score(); curDoc = doc; } return curScore; }
protected ScoringGroupHead(Scorer scorer, T groupValue, int doc, int docBase) throws IOException { super(groupValue, doc, docBase); assert scorer.docID() == doc; this.scorer = scorer; this.topScore = scorer.score(); }
@Override protected int compare(int compIDX, int doc) throws IOException { assert scorer.docID() == doc; assert compIDX == 0; float score = scorer.score(); int c = Float.compare(score, topScore); if (c > 0) topScore = score; return c; }
@Override public float score() throws IOException { int doc = in.docID(); if (doc != curDoc) { curScore = in.score(); curDoc = doc; } return curScore; }
@Override public float score() throws IOException { float score = in.score() * vals.floatVal(in.docID()); // Current Lucene priority queues can't handle NaN and -Infinity, so // map to -Float.MAX_VALUE. This conditional handles both -infinity // and NaN since comparisons with NaN are always false. return score>Float.NEGATIVE_INFINITY ? score : -Float.MAX_VALUE; }
@Override public float score() throws IOException { float score = in.score() * vals.floatVal(in.docID()); // Current Lucene priority queues can't handle NaN and -Infinity, so // map to -Float.MAX_VALUE. This conditional handles both -infinity // and NaN since comparisons with NaN are always false. return score>Float.NEGATIVE_INFINITY ? score : -Float.MAX_VALUE; }
@Override public float score() throws IOException { float score = qWeight * scorer.score() * vals.floatVal(scorer.docID()); // Current Lucene priority queues can't handle NaN and -Infinity, so // map to -Float.MAX_VALUE. This conditional handles both -infinity // and NaN since comparisons with NaN are always false. return score>Float.NEGATIVE_INFINITY ? score : -Float.MAX_VALUE; }
@Override public float score() throws IOException { float rawScore = innerScorer.score(); long timeVal = termList.getRawValue(orderArray.get(innerScorer.docID())); float timeScore = computeTimeFactor(timeVal); return combineScores(timeScore, rawScore); }