mirror of https://github.com/apache/lucene.git
LUCENE-7486: Explain() should initialize maxScore to NEGATIVE_INFINITY too.
This commit is contained in:
parent
ea1212232d
commit
9304ef9f11
|
@ -141,7 +141,7 @@ public final class DisjunctionMaxQuery extends Query implements Iterable<Query>
|
||||||
@Override
|
@Override
|
||||||
public Explanation explain(LeafReaderContext context, int doc) throws IOException {
|
public Explanation explain(LeafReaderContext context, int doc) throws IOException {
|
||||||
boolean match = false;
|
boolean match = false;
|
||||||
float max = 0.0f, sum = 0.0f;
|
float max = Float.NEGATIVE_INFINITY, sum = 0.0f;
|
||||||
List<Explanation> subs = new ArrayList<>();
|
List<Explanation> subs = new ArrayList<>();
|
||||||
for (Weight wt : weights) {
|
for (Weight wt : weights) {
|
||||||
Explanation e = wt.explain(context, doc);
|
Explanation e = wt.explain(context, doc);
|
||||||
|
|
Loading…
Reference in New Issue