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

Let MultiCollector Scorer handle minCompetitiveScore calls

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: master (9.0), 8.6
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      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

              • Assignee:
                tflobbe Tomas Eduardo Fernandez Lobbe
                Reporter:
                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