Don't run SQL rewrites when secondary index is enabled
If the secondary index is enabled on a server the index handles all queries. There is no reason to run the SQL rewrites or to leave predicates in the predicate tree without being wrapped by the IndexedChangeQuery predicate. Change-Id: I18defed2a5a6003b9ae6ba227e29864b5c912e7b
This commit is contained in:
@@ -121,8 +121,8 @@ public class QueryBuilder {
|
||||
private static Query sortKeyQuery(SortKeyPredicate p) {
|
||||
return NumericRangeQuery.newLongRange(
|
||||
p.getField().getName(),
|
||||
p.getMinValue(),
|
||||
p.getMaxValue(),
|
||||
p.getMinValue() != Long.MIN_VALUE ? p.getMinValue() : null,
|
||||
p.getMaxValue() != Long.MAX_VALUE ? p.getMaxValue() : null,
|
||||
true, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user