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 2021/09/16 13:59:00 UTC

[jira] [Commented] (LUCENE-10110) MultiCollector should conditionally wrap single leaf collector

    [ https://issues.apache.org/jira/browse/LUCENE-10110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17416126#comment-17416126 ] 

Adrien Grand commented on LUCENE-10110:
---------------------------------------

Another way that I can think of avoiding this issue would be to use TOP_SCORES whenever not all collectors have the same ScoreMode. This would be simpler to implement but this would also likely lead to slower queries in many cases because e.g. top-level boolean queries would use WandScorer without ever calling setMinCompetitiveScore instead of using BS1. So I think your approach is better.

I think we should also add more docs to recommend users to avoid using MultiCollector, by explaining that running the query twice would often perform better?

> MultiCollector should conditionally wrap single leaf collector
> --------------------------------------------------------------
>
>                 Key: LUCENE-10110
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10110
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Jim Ferenczi
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> MultiCollector adapts the score mode of multiple collectors so that they can run together in a search. If a collector wants to skip low-scoring hits, this adapter ensures that the other collectors still see all hits. Although, when all these collectors have early terminated, we allow the skipping collector to start propagating the minimum score. This is not valid because the weight of the query is built from the combined score mode of all collectors at the beginning of the search.
> So we should always ignore the minimum score in MultiCollector if the combined score mode is different than TOP_SCORES.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org