You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Tomas Eduardo Fernandez Lobbe (Jira)" <ji...@apache.org> on 2020/06/10 21:02:00 UTC

[jira] [Created] (LUCENE-9402) Let MultiCollector Scorer handle minCompetitiveScore calls

Tomas Eduardo Fernandez Lobbe created LUCENE-9402:
-----------------------------------------------------

             Summary: Let MultiCollector Scorer handle minCompetitiveScore calls
                 Key: LUCENE-9402
                 URL: https://issues.apache.org/jira/browse/LUCENE-9402
             Project: Lucene - Core
          Issue Type: Improvement
            Reporter: Tomas Eduardo Fernandez Lobbe


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

{code:java}
@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);
      }
    }
{code}
Solr uses MultiCollector when scores are requested (to collect the max score), which means it wouldn't be able to use WAND algorithm.



--
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