lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nkn...@apache.org
Subject lucene-solr:master: LUCENE-7449: Fix bug in RangeFieldQuery.scorer
Date Fri, 17 Feb 2017 16:53:04 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master bd459c127 -> 907c43ce7


LUCENE-7449: Fix bug in RangeFieldQuery.scorer


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

Branch: refs/heads/master
Commit: 907c43ce7af389c42ef200e5c2ecefbc5eee8a7a
Parents: bd459c1
Author: Nicholas Knize <nknize@gmail.com>
Authored: Fri Feb 17 10:52:32 2017 -0600
Committer: Nicholas Knize <nknize@gmail.com>
Committed: Fri Feb 17 10:52:32 2017 -0600

----------------------------------------------------------------------
 .../src/java/org/apache/lucene/document/RangeFieldQuery.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/907c43ce/lucene/sandbox/src/java/org/apache/lucene/document/RangeFieldQuery.java
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/RangeFieldQuery.java b/lucene/sandbox/src/java/org/apache/lucene/document/RangeFieldQuery.java
index da7f3b6..41e64cf 100644
--- a/lucene/sandbox/src/java/org/apache/lucene/document/RangeFieldQuery.java
+++ b/lucene/sandbox/src/java/org/apache/lucene/document/RangeFieldQuery.java
@@ -171,8 +171,8 @@ abstract class RangeFieldQuery extends Query {
           // if query crosses, docs need to be further scrutinized
           byte[] range = getInternalRange(values.getMinPackedValue(), values.getMaxPackedValue());
           // if the internal node is not equal and not contained by the query, all docs do
not match
-          if ((!Arrays.equals(ranges, range)
-              && (target.contains(range) && queryType != QueryType.CONTAINS))
== false) {
+          if (!Arrays.equals(ranges, range)
+              && (!target.contains(range) || queryType != QueryType.WITHIN)) {
             allDocsMatch = false;
           }
         } else {


Mime
View raw message