You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Adrien Grand (Jira)" <ji...@apache.org> on 2022/04/04 16:03:00 UTC

[jira] [Resolved] (LUCENE-10498) Optimize TopField and TopScoreDoc collector by only counting hits when necessary

     [ https://issues.apache.org/jira/browse/LUCENE-10498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrien Grand resolved LUCENE-10498.
-----------------------------------
    Fix Version/s: 9.2
       Resolution: Fixed

> 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
>             Fix For: 9.2
>
>          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-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org