Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9402

Let MultiCollector Scorer handle minCompetitiveScore calls

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 9.0, 8.6
    • None
    • None
    • New

    Description

      See SOLR-14554. MultiCollector creates a scorer that explicitly prevents setting the minCompetitiveScore:

      @Override
          public void setScorer(Scorable scorer) throws IOException {
            if (cacheScores) {
              scorer = new ScoreCachingWrappingScorer(scorer);
            }
            scorer = new FilterScorable(scorer) {
              @Override
              public void setMinCompetitiveScore(float minScore) throws IOException {
                // Ignore calls to setMinCompetitiveScore so that if we wrap two
                // collectors and one of them wants to skip low-scoring hits, then
                // the other collector still sees all hits. We could try to reconcile
                // min scores and take the maximum min score across collectors, but
                // this is very unlikely to be helpful in practice.
              }
      
            };
            for (int i = 0; i < numCollectors; ++i) {
              final LeafCollector c = collectors[i];
              c.setScorer(scorer);
            }
          }
      

      Solr uses MultiCollector when scores are requested (to collect the max score), which means it wouldn't be able to use WAND algorithm.

      Attachments

        Issue Links

          Activity

            People

              tflobbe Tomas Eduardo Fernandez Lobbe
              tflobbe Tomas Eduardo Fernandez Lobbe
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h