reta commented on a change in pull request #749:
URL: https://github.com/apache/lucene/pull/749#discussion_r839872948
##########
File path:
lucene/sandbox/src/java/org/apache/lucene/sandbox/search/IndexSortSortedNumericDocValuesRangeQuery.java
##########
@@ -318,6 +326,17 @@ private static ValueComparator loadComparator(
};
}
+ private static Number convert(Type type, long topValue) {
+ if (type == Type.INT) {
+ return (int) topValue;
+ } else if (type == Type.LONG) {
+ return topValue;
+ } else {
+ throw new IllegalArgumentException(
Review comment:
@jtibshirani I kept the decision point in one place (`convert` method),
in case conversion is not available - the absence of value comparator is
propagated to `getDocIdSetIteratorOrNull`, please let me know what do you think.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]