kkewwei commented on code in PR #16952:
URL: https://github.com/apache/lucene/pull/16952#discussion_r4730911723
##########
lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java:
##########
@@ -1074,8 +1074,7 @@ private LeafReaderContextPartition(
/** Creates a partition of the provided leaf context that targets the
entire segment */
public static LeafReaderContextPartition
createForEntireSegment(LeafReaderContext ctx) {
- return new LeafReaderContextPartition(
- ctx, 0, DocIdSetIterator.NO_MORE_DOCS, ctx.reader().maxDoc());
+ return new LeafReaderContextPartition(ctx, 0, ctx.reader().maxDoc(),
ctx.reader().maxDoc());
Review Comment:
If the `minDocId` > 0, the `advance` will compare `docID` against the
target, so they can easily reach the actual lower bound.
And I think the case for changing it would be more convincing if we
encountered an actual performance or correctness issue.
--
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]