Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-14983

Score returned in search request is original score and not reranked score

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 8.0
    • 8.8, 9.0
    • None
    • None

    Description

      Score returned in search request is original score and not reranked score post the changes in https://issues.apache.org/jira/browse/LUCENE-8412.

      Commit - https://github.com/apache/lucene-solr/commit/55bfadbce115a825a75686fe0bfe71406bc3ee44#diff-4e354f104ed52bd7f620b0c05ae8467d

      Specifically - 

      if (cmd.getSort() != null && query instanceof RankQuery == false && (cmd.getFlags() & GET_SCORES) != 0)

      {     TopFieldCollector.populateScores(topDocs.scoreDocs, this, query); }

      in SolrIndexSearcher.java recomputes the score but outputs only the original score and not the reranked score.

       

      The issue is cmd.getQuery() is a type of RankQuery but the "query" variable is a boolean query and probably replacing query with cmd.getQuery() should be the right fix for this so that the score is not overriden for rerank queries

       

      Attachments

        1. 0001-LUCENE-9542-Unit-test-to-reproduce-bug.patch
          6 kB
          Jason Baik
        2. SOLR-14983.patch
          6 kB
          Christine Poerschke
        3. SOLR-14983.patch
          6 kB
          Christine Poerschke

        Activity

          People

            cpoerschke Christine Poerschke
            krishan1390 Krishan Goyal
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: