lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpou...@apache.org
Subject [1/2] lucene-solr:master: LUCENE-7486: Explain() should initialize maxScore to NEGATIVE_INFINITY too.
Date Fri, 14 Oct 2016 13:30:20 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 96e0c2ff4 -> b5a98cc52
  refs/heads/master ea1212232 -> 9304ef9f1


LUCENE-7486: Explain() should initialize maxScore to NEGATIVE_INFINITY too.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9304ef9f
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9304ef9f
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9304ef9f

Branch: refs/heads/master
Commit: 9304ef9f118d24f76b280299706310ca8a0d40e6
Parents: ea12122
Author: Adrien Grand <jpountz@gmail.com>
Authored: Fri Oct 14 15:18:29 2016 +0200
Committer: Adrien Grand <jpountz@gmail.com>
Committed: Fri Oct 14 15:29:30 2016 +0200

----------------------------------------------------------------------
 .../src/java/org/apache/lucene/search/DisjunctionMaxQuery.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9304ef9f/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java b/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java
index b29126b..44cbd52 100644
--- a/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java
@@ -141,7 +141,7 @@ public final class DisjunctionMaxQuery extends Query implements Iterable<Query>
     @Override
     public Explanation explain(LeafReaderContext context, int doc) throws IOException {
       boolean match = false;
-      float max = 0.0f, sum = 0.0f;
+      float max = Float.NEGATIVE_INFINITY, sum = 0.0f;
       List<Explanation> subs = new ArrayList<>();
       for (Weight wt : weights) {
         Explanation e = wt.explain(context, doc);


Mime
View raw message