[ https://issues.apache.org/jira/browse/LUCENE-10498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17516917#comment-17516917 ]
ASF subversion and git services commented on LUCENE-10498: ---------------------------------------------------------- Commit 0a525ce2aba572855ce045e77f3a8c9acac5a199 in lucene's branch refs/heads/main from Luca Cavanna [ https://gitbox.apache.org/repos/asf?p=lucene.git;h=0a525ce2aba ] LUCENE-10498: don't count num hits nor accumulate scores unless necessary (#782) This commit introduces a no-op implementation of HitsThresholdChecker that does no counting, to be used when early termination is disabled. This is automatically used when creating a TopFieldCollector or a TopScoreDocCollector. In that same scenario MaxScoreAccumulator can be null and scores are no longer accumulated when creating a shared collector manager. With this, it is safe to replace the custom collector managers in DrillSideways with the ones returned by calling createSharedManager. > Optimize TopField and TopScoreDoc collector by only counting hits when > necessary > -------------------------------------------------------------------------------- > > Key: LUCENE-10498 > URL: https://issues.apache.org/jira/browse/LUCENE-10498 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Luca Cavanna > Priority: Minor > Time Spent: 20m > Remaining Estimate: 0h > > The current implementations of TopFieldCollector and TopScoreDocCollector > count the number of hits as part of their HitsThresholdChecker impl. When > early termination is disabled, meaning when total hits is Integer.MAX_VALUE, > counting as well as accumulating scores in MaxScoreAccumulator is not > necessary. > We could optimize these two collector by disabling the counting as well as > scores accumulation when early termination is not possible. > This is a spin-off of LUCENE-10486. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org