LUCENE-7449: Fix bug in RangeFieldQuery.scorer

This commit is contained in:
Nicholas Knize 2017-02-17 10:52:32 -06:00
parent bd459c1275
commit 907c43ce7a
1 changed files with 2 additions and 2 deletions

View File

@ -171,8 +171,8 @@ abstract class RangeFieldQuery extends Query {
// if query crosses, docs need to be further scrutinized
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 ((!Arrays.equals(ranges, range)
&& (target.contains(range) && queryType != QueryType.CONTAINS)) == false) {
if (!Arrays.equals(ranges, range)
&& (!target.contains(range) || queryType != QueryType.WITHIN)) {
allDocsMatch = false;
}
} else {