mirror of https://github.com/apache/lucene.git
LUCENE-7449: fix CROSSES queries so they don't match all docs when internal nodes are equal
This commit is contained in:
parent
a3f4896359
commit
f3ba7f4105
|
@ -171,8 +171,8 @@ abstract class RangeFieldQuery extends Query {
|
||||||
// if query crosses, docs need to be further scrutinized
|
// if query crosses, docs need to be further scrutinized
|
||||||
byte[] range = getInternalRange(values.getMinPackedValue(), values.getMaxPackedValue());
|
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 the internal node is not equal and not contained by the query, all docs do not match
|
||||||
if (!Arrays.equals(ranges, range)
|
if (queryType == QueryType.CROSSES || (!Arrays.equals(ranges, range)
|
||||||
&& (!target.contains(range) || queryType != QueryType.WITHIN)) {
|
&& (target.contains(range) == false || queryType != QueryType.WITHIN))) {
|
||||||
allDocsMatch = false;
|
allDocsMatch = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue