You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2017/12/04 09:54:27 UTC

[1/3] lucene-solr:master: LUCENE-8074: Introduce leniency to work around scoringi accuracy issues caused by ReqOptSumScorer.

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 9e162e917 -> 24f0fa5dc
  refs/heads/master 2ed0f1b68 -> bdaf1baa8


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/master
Commit: faa77e92dd550f92456ea0050b9da6f364c670b6
Parents: 2ed0f1b
Author: Adrien Grand <jp...@gmail.com>
Authored: Mon Dec 4 10:14:35 2017 +0100
Committer: Adrien Grand <jp...@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));
           }
         }
 


[2/3] lucene-solr:master: LUCENE-8078: The query cache should not cache instances of MatchNoDocsQuery

Posted by jp...@apache.org.
LUCENE-8078: The query cache should not cache instances of MatchNoDocsQuery


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

Branch: refs/heads/master
Commit: bdaf1baa8081a55d738a622bf5510040a18286a3
Parents: faa77e9
Author: Adrien Grand <jp...@gmail.com>
Authored: Mon Dec 4 10:26:03 2017 +0100
Committer: Adrien Grand <jp...@gmail.com>
Committed: Mon Dec 4 10:26:03 2017 +0100

----------------------------------------------------------------------
 lucene/CHANGES.txt                                                | 3 +++
 .../org/apache/lucene/search/UsageTrackingQueryCachingPolicy.java | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bdaf1baa/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 10a6351..c861566 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -127,6 +127,9 @@ Bug Fixes
 * LUCENE-8034: Use subtraction instead of addition to sidestep int
   overflow in SpanNotQuery.  (Hari Menon via Mike McCandless)
 
+* LUCENE-8078: The query cache should not cache instances of
+  MatchNoDocsQuery. (Jon Harper via Adrien Grand)
+
 Optimizations
 
 * LUCENE-8018: Smaller FieldInfos memory footprint by not retaining unnecessary

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bdaf1baa/lucene/core/src/java/org/apache/lucene/search/UsageTrackingQueryCachingPolicy.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/UsageTrackingQueryCachingPolicy.java b/lucene/core/src/java/org/apache/lucene/search/UsageTrackingQueryCachingPolicy.java
index 1bbed5c..c16d7f2 100644
--- a/lucene/core/src/java/org/apache/lucene/search/UsageTrackingQueryCachingPolicy.java
+++ b/lucene/core/src/java/org/apache/lucene/search/UsageTrackingQueryCachingPolicy.java
@@ -68,7 +68,7 @@ public class UsageTrackingQueryCachingPolicy implements QueryCachingPolicy {
     // For the below queries, it's cheap to notice they cannot match any docs so
     // we do not bother caching them.
     if (query instanceof MatchNoDocsQuery) {
-      return false;
+      return true;
     }
 
     if (query instanceof BooleanQuery) {


[3/3] lucene-solr:branch_7x: LUCENE-8078: The query cache should not cache instances of MatchNoDocsQuery

Posted by jp...@apache.org.
LUCENE-8078: The query cache should not cache instances of MatchNoDocsQuery


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

Branch: refs/heads/branch_7x
Commit: 24f0fa5dc481d394de2c3ba6764195b1906b2903
Parents: 9e162e9
Author: Adrien Grand <jp...@gmail.com>
Authored: Mon Dec 4 10:26:03 2017 +0100
Committer: Adrien Grand <jp...@gmail.com>
Committed: Mon Dec 4 10:53:56 2017 +0100

----------------------------------------------------------------------
 lucene/CHANGES.txt                                                | 3 +++
 .../org/apache/lucene/search/UsageTrackingQueryCachingPolicy.java | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/24f0fa5d/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 551b87d..432f9b3 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -88,6 +88,9 @@ Bug Fixes
 * LUCENE-8034: Use subtraction instead of addition to sidestep int
   overflow in SpanNotQuery.  (Hari Menon via Mike McCandless)
 
+* LUCENE-8078: The query cache should not cache instances of
+  MatchNoDocsQuery. (Jon Harper via Adrien Grand)
+
 Optimizations
 
 * LUCENE-8018: Smaller FieldInfos memory footprint by not retaining unnecessary

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/24f0fa5d/lucene/core/src/java/org/apache/lucene/search/UsageTrackingQueryCachingPolicy.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/UsageTrackingQueryCachingPolicy.java b/lucene/core/src/java/org/apache/lucene/search/UsageTrackingQueryCachingPolicy.java
index 1bbed5c..c16d7f2 100644
--- a/lucene/core/src/java/org/apache/lucene/search/UsageTrackingQueryCachingPolicy.java
+++ b/lucene/core/src/java/org/apache/lucene/search/UsageTrackingQueryCachingPolicy.java
@@ -68,7 +68,7 @@ public class UsageTrackingQueryCachingPolicy implements QueryCachingPolicy {
     // For the below queries, it's cheap to notice they cannot match any docs so
     // we do not bother caching them.
     if (query instanceof MatchNoDocsQuery) {
-      return false;
+      return true;
     }
 
     if (query instanceof BooleanQuery) {