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 2018/08/01 19:40:02 UTC

lucene-solr:master: LUCENE-8312: Fixed performance regression with non-scoring term queries.

Repository: lucene-solr
Updated Branches:
  refs/heads/master 18c2300fd -> 64573c142


LUCENE-8312: Fixed performance regression with non-scoring term queries.


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

Branch: refs/heads/master
Commit: 64573c142c851741da50f8858c9d630557a151d0
Parents: 18c2300
Author: Adrien Grand <jp...@gmail.com>
Authored: Wed Aug 1 19:13:54 2018 +0200
Committer: Adrien Grand <jp...@gmail.com>
Committed: Wed Aug 1 21:39:55 2018 +0200

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


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/64573c14/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/TermQuery.java b/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
index 46901f2..3fa4aa7 100644
--- a/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
@@ -114,7 +114,7 @@ public class TermQuery extends Query {
       if (scoreMode == ScoreMode.TOP_SCORES) {
         return new TermScorer(this, termsEnum.impacts(PostingsEnum.FREQS), scorer);
       } else {
-        return new TermScorer(this, termsEnum.postings(null, PostingsEnum.FREQS), scorer);
+        return new TermScorer(this, termsEnum.postings(null, scoreMode.needsScores() ? PostingsEnum.FREQS : PostingsEnum.NONE), scorer);
       }
     }