bugmakerrrrrr commented on PR #14395: URL: https://github.com/apache/lucene/pull/14395#issuecomment-2750983066
> The change looks correct to me. With recent changes to allow clauses that match all docs to remove themselves from a conjunction, it should be possible to achieve something similar by implementing `#docIDRunEnd()` on competitive iterators. I need to think a bit more about the pros and cons of these two approaches. @jpountz If I understand correctly, I think both optimizations can be implemented at the same time, and there is no conflict between the two. If we know we can't skip any docs before collection, then there's no need to maintain competitiveIterator-related data, and it helps for implementations that don't benefit from `docIDRunEnd`. Instead, `docIDRunEnd` can implement the skip logic during runtime. Of course, the current implementation only informs the comparator once, but if we could inform each segment separately, we could also disable/enable sort on the fly based on the current total hits and max doc of current segment. -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org