newSlowRangeQuery
Create a range query that matches all documents whose value is between lowerValue and upperValue included.
You can have half-open ranges (which are in fact / queries) by setting lowerValue = Long.MIN_VALUE or upperValue = Long.MAX_VALUE.
Ranges are inclusive. For exclusive ranges, pass Math.addExact(lowerValue, 1) or Math.addExact(upperValue, -1).
This query also works with fields that have indexed NumericDocValuesFields.
NOTE: Such queries cannot efficiently advance to the next match, which makes them slow if they are not ANDed with a selective query. As a consequence, they are best used wrapped in an IndexOrDocValuesQuery, alongside a range query that executes on points, such as LongPoint.newRangeQuery.