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


##########
solr/benchmark/src/java/org/apache/solr/bench/MiniClusterState.java:
##########


Review Comment:
   The field `useHttp1` is initialized with `Boolean.getBoolean("solr.http1")` 
so what's the point of the changes you are adding here?



##########
solr/core/src/test/org/apache/solr/search/ReturnFieldsTest.java:
##########
@@ -395,6 +395,16 @@ public void testFunkyFieldNames() {
         "//arr[@name='#foo_s']/str[.='how now brown cow']");
   }
 
+  @Test
+  public void testRowsZeroNoScore() {
+    ReturnFields rf = new SolrReturnFields(req("fl", "id,score", "rows", "0"));
+    assertFalse(rf.wantsScore());
+    assertFalse(rf.wantsField("score"));
+    assertTrue(rf.wantsField("id"));

Review Comment:
   A TODO is fine.



##########
solr/core/src/java/org/apache/solr/search/SolrReturnFields.java:
##########
@@ -532,10 +540,18 @@ private void addField(
     okFieldNames.add(key);
     // a valid field name
     if (SCORE.equals(field)) {
-      _wantsScore = true;
+      if (_noRows) {

Review Comment:
   At least add a TODO to not even get to this point if noRows is true; we 
shouldn't even parse "fl".  As a reader of this code, it's odd to see special 
handling on SCORE in particular just because of noRows.



-- 
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: issues-unsubscr...@solr.apache.org

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

Reply via email to