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
|
@Override
|
||||||
public Scorer get(long leadCost) throws IOException {
|
public Scorer get(long leadCost) throws IOException {
|
||||||
WeightOrDocIdSet weightOrDocIdSet = rewrite(context);
|
WeightOrDocIdSet weightOrDocIdSet = rewrite(context);
|
||||||
if (weightOrDocIdSet == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
final Scorer scorer;
|
final Scorer scorer;
|
||||||
if (weightOrDocIdSet.weight != null) {
|
if (weightOrDocIdSet == null) {
|
||||||
|
scorer = null;
|
||||||
|
} else if (weightOrDocIdSet.weight != null) {
|
||||||
scorer = weightOrDocIdSet.weight.scorer(context);
|
scorer = weightOrDocIdSet.weight.scorer(context);
|
||||||
} else {
|
} else {
|
||||||
scorer = scorer(weightOrDocIdSet.set);
|
scorer = scorer(weightOrDocIdSet.set);
|
||||||
|
|
Loading…
Reference in New Issue