lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [48/50] lucene-solr:jira/solr-11458-2: LUCENE-8074: Introduce leniency to work around scoringi accuracy issues caused by ReqOptSumScorer.
Date Mon, 04 Dec 2017 17:49:32 GMT
LUCENE-8074: Introduce leniency to work around scoringi accuracy issues caused by ReqOptSumScorer.


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

Branch: refs/heads/jira/solr-11458-2
Commit: faa77e92dd550f92456ea0050b9da6f364c670b6
Parents: 2ed0f1b
Author: Adrien Grand <jpountz@gmail.com>
Authored: Mon Dec 4 10:14:35 2017 +0100
Committer: Adrien Grand <jpountz@gmail.com>
Committed: Mon Dec 4 10:14:35 2017 +0100

----------------------------------------------------------------------
 .../apache/lucene/search/TestBooleanMinShouldMatch.java   | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/faa77e92/lucene/core/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java
b/lucene/core/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java
index 26ce9c7..1d01f9a 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestBooleanMinShouldMatch.java
@@ -380,7 +380,15 @@ public class TestBooleanMinShouldMatch extends LuceneTestCase {
                 + CheckHits.topdocsString(top1,0,0)
                 + CheckHits.topdocsString(top2,0,0)
                 + "for query:" + q.toString(),
-                score, otherScore, 0d);
+                score, otherScore,
+                // If there is at least one MUST/FILTER clause and if
+                // minShouldMatch is equal to the number of SHOULD clauses,
+                // then a query that was previously executed with
+                // ReqOptSumScorer is now executed with ConjunctionScorer.
+                // We need to introduce some leniency because ReqOptSumScorer
+                // casts intermediate values to floats before summing up again
+                // which hurts accuracy.
+                Math.ulp(score));
           }
         }
 


Mime
View raw message