You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Dawn <li...@live.com> on 2020/03/11 14:41:26 UTC

Where fq, field sort and rerank query, the score of rerank is not correct

GetDocListNC method in the SolrIndexSearcher class, Query is converted to BooleanQuery when fq queries are available.

Has a call query instanceof RankQuery below, which will never be true.

The score of rerank is not correct.

Do you need to add a loop to the query type?


ProcessedFilter pf = getProcessedFilter(cmd.getFilter(), cmd.getFilterList());
if (pf.filter != null) {
  query = new BooleanQuery.Builder().add(query, Occur.MUST).add(pf.filter, Occur.FILTER).build();
}
if (cmd.getSort() != null && query instanceof RankQuery == false && (cmd.getFlags() & GET_SCORES) != 0) {
  TopFieldCollector.populateScores(topDocs.scoreDocs, this, query);
}



Thanks