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/09 21:20:00 UTC

[jira] [Updated] (SOLR-14554) BMW algorithm isn't used when scores are requested

     [ https://issues.apache.org/jira/browse/SOLR-14554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tomas Eduardo Fernandez Lobbe updated SOLR-14554:
-------------------------------------------------
    Description: 
This is because, when scores are requested, we use MultiCollector, and it will end up using a scorer that explicitly skips delegating calls to set the minimum competitive score:

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

> BMW algorithm isn't used when scores are requested
> --------------------------------------------------
>
>                 Key: SOLR-14554
>                 URL: https://issues.apache.org/jira/browse/SOLR-14554
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: master (9.0), 8.6
>            Reporter: Tomas Eduardo Fernandez Lobbe
>            Priority: Major
>
> This is because, when scores are requested, we use MultiCollector, and it will end up using a scorer that explicitly skips delegating calls to set the minimum competitive score:
> {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}



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