mirror of https://github.com/apache/lucene.git
Ensure TermInSetQuery ScoreSupplier never returns null Scorer
This commit is contained in:
parent
680f21dca5
commit
202dd809bd
|
@ -386,12 +386,10 @@ public class TermInSetQuery extends Query implements Accountable {
|
|||
@Override
|
||||
public Scorer get(long leadCost) throws IOException {
|
||||
WeightOrDocIdSet weightOrDocIdSet = rewrite(context);
|
||||
if (weightOrDocIdSet == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
final Scorer scorer;
|
||||
if (weightOrDocIdSet.weight != null) {
|
||||
if (weightOrDocIdSet == null) {
|
||||
scorer = null;
|
||||
} else if (weightOrDocIdSet.weight != null) {
|
||||
scorer = weightOrDocIdSet.weight.scorer(context);
|
||||
} else {
|
||||
scorer = scorer(weightOrDocIdSet.set);
|
||||
|
|
Loading…
Reference in New Issue