mirror of https://github.com/apache/lucene.git
LUCENE-6329: Calling score() should be ok even if needsScores is false.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1663756 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0689a2e0e0
commit
3d6de9371d
|
@ -152,13 +152,16 @@ abstract class DisjunctionScorer extends Scorer {
|
|||
previous = w;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// since we don't need scores, let's pretend we have a single match
|
||||
topScorers.next = null;
|
||||
}
|
||||
|
||||
// We need to explicitely set the list of top scorers to avoid the
|
||||
// laziness of DisjunctionScorer.score() that would take all scorers
|
||||
// positioned on the same doc as the top of the pq, including
|
||||
// non-matching scorers
|
||||
DisjunctionScorer.this.topScorers = topScorers;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue