mirror of https://github.com/apache/lucene.git
SOLR-11070: Fix DocValuesTest.testFloatAndDoubleRangeQueryRandom
Updated test to consider Infinity a match when using * in range query
This commit is contained in:
parent
9e8027d39a
commit
1582509d04
|
@ -614,8 +614,8 @@ public class DocValuesTest extends SolrTestCaseJ4 {
|
||||||
long minSortable = toSortableLong.get(i).apply(minVal);
|
long minSortable = toSortableLong.get(i).apply(minVal);
|
||||||
long maxSortable = toSortableLong.get(i).apply(maxVal);
|
long maxSortable = toSortableLong.get(i).apply(maxVal);
|
||||||
|
|
||||||
if((minInclusive && minSortable<=valSortable || !minInclusive && minSortable<valSortable) &&
|
if((minInclusive && minSortable<=valSortable || !minInclusive && minSortable<valSortable || (min.equals("*") && val == negativeInfinity[i])) &&
|
||||||
(maxInclusive && maxSortable>=valSortable || !maxInclusive && maxSortable>valSortable)) {
|
(maxInclusive && maxSortable>=valSortable || !maxInclusive && maxSortable>valSortable || (max.equals("*") && val == positiveInfinity[i]))) {
|
||||||
counter++;
|
counter++;
|
||||||
tests.add("//result/doc["+counter+"]/str[@name='id'][.="+(k+1)+"]");
|
tests.add("//result/doc["+counter+"]/str[@name='id'][.="+(k+1)+"]");
|
||||||
tests.add("//result/doc["+counter+"]/float[@name='score'][.=1.0]");
|
tests.add("//result/doc["+counter+"]/float[@name='score'][.=1.0]");
|
||||||
|
|
Loading…
Reference in New Issue