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:09:10 UTC
lucene-solr:branch_7x: SOLR-11070: Fix
DocValuesTest.testFloatAndDoubleRangeQueryRandom
Repository: lucene-solr
Updated Branches:
refs/heads/branch_7x cef31d624 -> de5b6f989
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/de5b6f98
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/de5b6f98
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/de5b6f98
Branch: refs/heads/branch_7x
Commit: de5b6f98923657b574a89effb896a4c3dd854df0
Parents: cef31d6
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:08:58 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/de5b6f98/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]");