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 2021/05/14 12:02:21 UTC

[lucene] branch main updated (8e94a59 -> 8045a17)

This is an automated email from the ASF dual-hosted git repository.

jpountz pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git.


    from 8e94a59  LUCENE-9932: Fix test bug.
     new 2c04ab5  LUCENE-9958: Fixed performance regression for boolean queries that configure a minimum number of matching clauses.
     new 8045a17  LUCENE-9932: Spotless.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 lucene/CHANGES.txt                                                     | 3 +++
 lucene/core/src/java/org/apache/lucene/search/WANDScorer.java          | 2 +-
 .../test/org/apache/lucene/util/bkd/TestMutablePointsReaderUtils.java  | 3 ++-
 3 files changed, 6 insertions(+), 2 deletions(-)

[lucene] 01/02: LUCENE-9958: Fixed performance regression for boolean queries that configure a minimum number of matching clauses.

Posted by jp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jpountz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git

commit 2c04ab58353eb56d254b09ba075ff33e20e9d329
Author: Adrien Grand <jp...@gmail.com>
AuthorDate: Fri May 14 13:55:12 2021 +0200

    LUCENE-9958: Fixed performance regression for boolean queries that configure a minimum number of matching clauses.
---
 lucene/CHANGES.txt                                            | 3 +++
 lucene/core/src/java/org/apache/lucene/search/WANDScorer.java | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 53fcf11..50385fd 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -383,6 +383,9 @@ Bug Fixes
 * LUCENE-9887: Fixed parameter use in RadixSelector.
   (liupanfeng via Adrien Grand)
 
+* LUCENE-9958: Fixed performance regression for boolean queries that configure a
+  minimum number of matching clauses. (Adrien Grand, Matt Weber)
+
 Other
 ---------------------
 
diff --git a/lucene/core/src/java/org/apache/lucene/search/WANDScorer.java b/lucene/core/src/java/org/apache/lucene/search/WANDScorer.java
index f33af6b..48e3a2c 100644
--- a/lucene/core/src/java/org/apache/lucene/search/WANDScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/WANDScorer.java
@@ -548,7 +548,7 @@ final class WANDScorer extends Scorer {
 
   /** Insert an entry in 'tail' and evict the least-costly scorer if full. */
   private DisiWrapper insertTailWithOverFlow(DisiWrapper s) {
-    if (tailMaxScore + s.maxScore < minCompetitiveScore) {
+    if (tailMaxScore + s.maxScore < minCompetitiveScore || tailSize + 1 < minShouldMatch) {
       // we have free room for this new entry
       addTail(s);
       tailMaxScore += s.maxScore;

[lucene] 02/02: LUCENE-9932: Spotless.

Posted by jp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jpountz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git

commit 8045a170f42f3562f8d13616e2c4426bbcacf3a1
Author: Adrien Grand <jp...@gmail.com>
AuthorDate: Fri May 14 13:58:42 2021 +0200

    LUCENE-9932: Spotless.
---
 .../test/org/apache/lucene/util/bkd/TestMutablePointsReaderUtils.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lucene/core/src/test/org/apache/lucene/util/bkd/TestMutablePointsReaderUtils.java b/lucene/core/src/test/org/apache/lucene/util/bkd/TestMutablePointsReaderUtils.java
index 7c893e3..4419156 100644
--- a/lucene/core/src/test/org/apache/lucene/util/bkd/TestMutablePointsReaderUtils.java
+++ b/lucene/core/src/test/org/apache/lucene/util/bkd/TestMutablePointsReaderUtils.java
@@ -243,7 +243,8 @@ public class TestMutablePointsReaderUtils extends LuceneTestCase {
         System.arraycopy(
             dataDims, 0, value, config.packedIndexBytesLength, numDataDims * config.bytesPerDim);
         points[i] =
-            new Point(value, isDocIdIncremental ? Math.min(i, maxDoc - 1) : random().nextInt(maxDoc));
+            new Point(
+                value, isDocIdIncremental ? Math.min(i, maxDoc - 1) : random().nextInt(maxDoc));
       }
       for (int i = 0; i < config.numIndexDims; ++i) {
         commonPrefixLengths[i] = config.bytesPerDim;