jpountz commented on code in PR #13149:
URL: https://github.com/apache/lucene/pull/13149#discussion_r1538276505
##########
lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java:
##########
@@ -222,6 +230,14 @@ public void visit(DocIdSetIterator iterator) throws
IOException {
cost[0] = Math.max(0, cost[0] - iterator.cost());
}
+ @Override
+ public void visit(IntsRef ref) throws IOException {
+ for (int i = ref.offset; i < ref.offset + ref.length; i++) {
+ result.clear(ref.ints[i]);
+ cost[0]--;
Review Comment:
you could move this outside of the loop and decrement by `ref.length` in one
go?
--
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]