Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure top docs optimization is fully disabled for queries with unbounded max scores. #46105

Merged
merged 2 commits into from
Aug 29, 2019

Commits on Aug 28, 2019

  1. Ensure top docs optimization is fully disabled for queries with unbou…

    …nded max scores.
    
    When a query contains a mandatory clause that doesn't track the max score per
    block, we disable the max score optimization. Previously, we were doing this by
    wrapping the collector with a FilterCollector that always returned
    ScoreMode.COMPLETE.
    
    However we weren't adjusting totalHitsThreshold, so the collector could still
    call Scorer#setMinCompetitiveScore. It is against the method contract to call
    setMinCompetitiveScore when the score mode is COMPLETE, and some scorers like
    ReqOptSumScorer throw an error in this case.
    
    This commit tries to disable the optimization by always setting
    totalHitsThreshold to max int, as opposed to wrapping the collector.
    jtibshirani committed Aug 28, 2019
    Configuration menu
    Copy the full SHA
    ac4c122 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2019

  1. Fix an issue where we could re-enable the optimization when shortcirc…

    …uiting the total hit count.
    jtibshirani committed Aug 29, 2019
    Configuration menu
    Copy the full SHA
    646cbf5 View commit details
    Browse the repository at this point in the history