Skip to content

Commit

Permalink
Keep using IndexSortSortedNumericDocValuesRangeQuery for IODVQ case
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Froh <froh@amazon.com>
  • Loading branch information
msfroh committed Oct 11, 2024
1 parent de7bd65 commit 5eae8c2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,9 @@ public Query rangeQuery(
DateMathParser parser = forcedDateParser == null ? dateMathParser : forcedDateParser;
return dateRangeQuery(lowerTerm, upperTerm, includeLower, includeUpper, timeZone, parser, context, resolution, (l, u) -> {
Query dvQuery = hasDocValues() ? SortedNumericDocValuesField.newSlowRangeQuery(name(), l, u) : null;
if (dvQuery != null && context.indexSortedOnField(name())) {
dvQuery = new IndexSortSortedNumericDocValuesRangeQuery(name(), l, u, dvQuery);
}
if (isSearchable()) {
Query pointRangeQuery = LongPoint.newRangeQuery(name(), l, u);
Query query;
Expand Down Expand Up @@ -502,9 +505,6 @@ protected String toString(int dimension, byte[] value) {
}

// Not searchable. Must have doc values.
if (context.indexSortedOnField(name())) {
dvQuery = new IndexSortSortedNumericDocValuesRangeQuery(name(), l, u, dvQuery);
}
return dvQuery;
});
}
Expand Down

0 comments on commit 5eae8c2

Please sign in to comment.