You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by tf...@apache.org on 2017/07/27 00:08:40 UTC

lucene-solr:master: SOLR-11070: Fix DocValuesTest.testFloatAndDoubleRangeQueryRandom

Repository: lucene-solr
Updated Branches:
  refs/heads/master 9e8027d39 -> 1582509d0


SOLR-11070: Fix DocValuesTest.testFloatAndDoubleRangeQueryRandom

Updated test to consider Infinity a match when using * in range query


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

Branch: refs/heads/master
Commit: 1582509d045fdf43ec4103f9c512e91e85f3e273
Parents: 9e8027d
Author: Tomas Fernandez Lobbe <tf...@apache.org>
Authored: Wed Jul 26 17:06:38 2017 -0700
Committer: Tomas Fernandez Lobbe <tf...@apache.org>
Committed: Wed Jul 26 17:06:38 2017 -0700

----------------------------------------------------------------------
 solr/core/src/test/org/apache/solr/schema/DocValuesTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1582509d/solr/core/src/test/org/apache/solr/schema/DocValuesTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/schema/DocValuesTest.java b/solr/core/src/test/org/apache/solr/schema/DocValuesTest.java
index 43c0006..dcda834 100644
--- a/solr/core/src/test/org/apache/solr/schema/DocValuesTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/DocValuesTest.java
@@ -614,8 +614,8 @@ public class DocValuesTest extends SolrTestCaseJ4 {
           long minSortable = toSortableLong.get(i).apply(minVal);
           long maxSortable = toSortableLong.get(i).apply(maxVal);
           
-          if((minInclusive && minSortable<=valSortable || !minInclusive && minSortable<valSortable) &&
-              (maxInclusive && maxSortable>=valSortable || !maxInclusive && maxSortable>valSortable)) {
+          if((minInclusive && minSortable<=valSortable || !minInclusive && minSortable<valSortable || (min.equals("*") && val == negativeInfinity[i])) &&
+              (maxInclusive && maxSortable>=valSortable || !maxInclusive && maxSortable>valSortable || (max.equals("*") && val == positiveInfinity[i]))) {
             counter++;
             tests.add("//result/doc["+counter+"]/str[@name='id'][.="+(k+1)+"]");
             tests.add("//result/doc["+counter+"]/float[@name='score'][.=1.0]");