[ https://issues.apache.org/jira/browse/LUCENE-9542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17208576#comment-17208576 ]
Christine Poerschke commented on LUCENE-9542: --------------------------------------------- Thanks [~krishan1390] for opening this issue with a link into the code! {quote}Score returned in search request is original score and not reranked score post ... {quote} Could you share more details on how to observe and reproduce the issue? I just tried the following steps on {{branch_7_7}} and {{branch_8x}} and it _seemed_ that the reranked score was being returned, perhaps a particular kind of query or re-ranking query is needed to encounter the issue? {code} git checkout $branch # branch_7_7 or branch_8x cd solr ; ant dist server # on master branch use gradle equivalent instead bin/solr start -e techproducts curl 'http://localhost:8983/solr/techproducts/select?rows=3&fl=id,score&q=*:*' curl 'http://localhost:8983/solr/techproducts/select?rows=3&fl=id,score&q=*:*&rq=\{!rerank+reRankQuery=id:VDBDB1A16\}' curl 'http://localhost:8983/solr/techproducts/select?rows=3&fl=id,score&q=*:*&rq=\{!rerank+reRankQuery=id:VDBDB1A16+reRankWeight=1\}' curl 'http://localhost:8983/solr/techproducts/select?rows=3&fl=id,score&q=*:*&rq=\{!rerank+reRankQuery=id:VDBDB1A16+reRankWeight=2\}' curl 'http://localhost:8983/solr/techproducts/select?rows=3&fl=id,score&q=*:*&rq=\{!rerank+reRankQuery=id:VDBDB1A16+reRankWeight=3\}' bin/solr stop {code} > Score returned in search request is original score and not reranked score > ------------------------------------------------------------------------- > > Key: LUCENE-9542 > URL: https://issues.apache.org/jira/browse/LUCENE-9542 > Project: Lucene - Core > Issue Type: Bug > Affects Versions: 8.0 > Reporter: Krishan > Priority: Major > > 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 > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org