Skip to content

Commit

Permalink
Change unsigned exact query to be consistent
Browse files Browse the repository at this point in the history
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
  • Loading branch information
harshavamsi committed Dec 8, 2023
1 parent df900a7 commit 2239618
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,15 @@ public Query termQuery(String field, Object value, boolean hasDocValues, boolean
return Queries.newMatchNoDocsQuery("Value [" + value + "] has a decimal part");
}
BigInteger v = parse(value, true);
return rangeQuery(field, v, v, true, true, hasDocValues, isSearchable, null);
if(isSearchable && hasDocValues){
Query query = BigIntegerPoint.newExactQuery(field, v);
Query dvQuery = SortedUnsignedLongDocValuesRangeQuery.newSlowRangeQuery(field, v, v);
return new IndexOrDocValuesQuery(query, dvQuery);
}
if(hasDocValues){
return SortedUnsignedLongDocValuesRangeQuery.newSlowRangeQuery(field, v, v);
}
return BigIntegerPoint.newExactQuery(field, v);
}

@Override
Expand Down

0 comments on commit 2239618

Please sign in to comment.