You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by da...@apache.org on 2017/03/14 02:19:50 UTC

[14/23] lucene-solr:jira/solr-9835: fix IntRange.newIntersectsQuery to use newRelationQuery helper

fix IntRange.newIntersectsQuery to use newRelationQuery helper


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

Branch: refs/heads/jira/solr-9835
Commit: 35e0c05dbb098fb14e04bf8e48efa1a7943f980a
Parents: d34d81f
Author: Nicholas Knize <nk...@gmail.com>
Authored: Mon Mar 13 02:36:57 2017 -0500
Committer: Nicholas Knize <nk...@gmail.com>
Committed: Mon Mar 13 02:36:57 2017 -0500

----------------------------------------------------------------------
 lucene/core/src/java/org/apache/lucene/document/IntRange.java | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/35e0c05d/lucene/core/src/java/org/apache/lucene/document/IntRange.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/document/IntRange.java b/lucene/core/src/java/org/apache/lucene/document/IntRange.java
index 2618f14..6d2b71c 100644
--- a/lucene/core/src/java/org/apache/lucene/document/IntRange.java
+++ b/lucene/core/src/java/org/apache/lucene/document/IntRange.java
@@ -188,12 +188,7 @@ public class IntRange extends Field {
    * @throws IllegalArgumentException if {@code field} is null, {@code min} or {@code max} is invalid
    */
   public static Query newIntersectsQuery(String field, final int[] min, final int[] max) {
-    return new RangeFieldQuery(field, encode(min, max), min.length, QueryType.INTERSECTS) {
-      @Override
-      protected String toString(byte[] ranges, int dimension) {
-        return IntRange.toString(ranges, dimension);
-      }
-    };
+    return newRelationQuery(field, min, max, QueryType.INTERSECTS);
   }
 
   /**