[
https://issues.apache.org/jira/browse/LUCENE-8935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16893708#comment-16893708
]
Jim Ferenczi commented on LUCENE-8935:
--------------------------------------
The logic is already at the bottom of Boolean2ScorerSupplier#get but good call
on the SHOULD clause that can produce a null scorer.
We can check the number of scoring clauses after the build instead of checking
the number of scorer suppliers. I'll work on a fix.
> BooleanQuery with no scoring clauses cannot skip documents when running
> TOP_SCORES mode
> ---------------------------------------------------------------------------------------
>
> Key: LUCENE-8935
> URL: https://issues.apache.org/jira/browse/LUCENE-8935
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Jim Ferenczi
> Priority: Minor
> Attachments: LUCENE-8935.patch
>
>
> Today a boolean query that is composed of filtering clauses only (more than
> one) cannot skip documents when the search is executed with the TOP_SCORES
> mode. However since all documents have a score of 0 it should be possible to
> early terminate the query as soon as we collected enough top hits. Wrapping
> the resulting boolean scorer in a constant score scorer should allow early
> termination in this case and would speed up the retrieval of top hits case
> considerably if the total hit count is not requested.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]