dsmiley commented on code in PR #2221:
URL: https://github.com/apache/solr/pull/2221#discussion_r1469804423


##########
solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java:
##########
@@ -1818,7 +1820,7 @@ private void getDocListNC(QueryResult qr, QueryCommand 
cmd) throws IOException {
     int[] ids;
     float[] scores;
 
-    boolean needScores = (cmd.getFlags() & GET_SCORES) != 0;
+    boolean needScores = ((cmd.getFlags() & GET_SCORES) != 0) && (cmd.getLen() 
!= 0);

Review Comment:
   Arguably, the caller shouldn't be applying GET_SCORES in the first place -- 
which is QueryComponent.  I suggested this idea yesterday; do you not like it?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to