Hi:

SolrIndexSearcher.getDocListNC and getDocListAndSetNC code snippet:

if (cmd.getSort() != null && query instanceof RankQuery == false && 
(cmd.getFlags() & GET_SCORES) != 0) {
  TopFieldCollector.populateScores(topDocs.scoreDocs, this, query);
}


When this query includes a filterQuery, `QueryUtils.combineQueryAndFilter` will 
build A new BooleanQuery and copy it to the Query object。
so `query instanceof RankQuery` is false, This causes the score to be lost in 
the RankQuery phase.

Can you change this to determine if the original query is RankQuery: 
`cmd.getQuery() instanceof RankQuery`. 


version 8.6.*, 9.*

Reply via email to