tomglk commented on a change in pull request #151: URL: https://github.com/apache/solr/pull/151#discussion_r655928003
########## File path: solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java ########## @@ -185,6 +187,8 @@ public void prepare(ResponseBuilder rb) throws IOException if(rq instanceof RankQuery) { RankQuery rankQuery = (RankQuery)rq; rb.setRankQuery(rankQuery); + // we always need the score for reRanking + rb.setFieldFlags(rb.getFieldFlags() | GET_SCORES); Review comment: That looks good to me! :) One thing that I stumbled upon while looking at your change is, that we actually override the flags instead of just adding the score, because we start with this: ```java int flags = 0; ``` A comment why we do this instead of starting with ```java int flags = rb.getFieldFlags(); ``` would be great, I think. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org