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

Adrien Grand updated LUCENE-8059:
---------------------------------
    Attachment: LUCENE-8059.patch

Here is a patch:
 - It adds a {{trackTotalHits}} parameter to the TopFieldCollector factory 
methods
 - totalHits is approximated when collection is early-terminated
 - EarlyTerminatingSortingCollector is removed (or rather moved to Solr which 
used this class in a way that made it hard to cut over to TopFieldCollector)

IndexSearcher still always performs a full collection for now. My goal here was 
just to make early termination easier to use. We might be able to 
simplify/improve based on the output of the discussion at LUCENE-8060 but I 
feel like this change is already a step in the right direction. In particular 
it is now easier to use early termination with pagination.

> Fold early termination support into TopFieldCollector
> -----------------------------------------------------
>
>                 Key: LUCENE-8059
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8059
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-8059.patch
>
>
> We should make early termination of requests easier to use.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to