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


##########
solr/core/src/java/org/apache/solr/request/json/RequestUtil.java:
##########
@@ -241,13 +243,16 @@ public static void processParams(
           if (queriesJsonObj instanceof Map && queriesJsonObj != null) {
             @SuppressWarnings("unchecked")
             final Map<String, Object> queriesAsMap = (Map<String, Object>) 
queriesJsonObj;
+            ArrayList<String> queryKeys = new ArrayList<>();
             for (Map.Entry<String, Object> queryJsonProperty : 
queriesAsMap.entrySet()) {
               out = queryJsonProperty.getKey();
+              queryKeys.add(out);
               arr = true;
               isQuery = true;
               convertJsonPropertyToLocalParams(
                   newMap, jsonQueryConverter, queryJsonProperty, out, isQuery, 
arr);
             }
+            newMap.put(COMBINER_KEYS, queryKeys.toArray(new 
String[queryKeys.size()]));

Review Comment:
   ```suggestion
               newMap.put(COMBINER_KEYS, queryKeys.toArray(new String[0]));
   ```
   We standardized on this recently; surprisingly a 0 helps perf



##########
solr/core/src/test/org/apache/solr/handler/component/DebugComponentTest.java:
##########
@@ -52,7 +64,7 @@ public void testBasicInterface() {
         "//str[@name='querystring']='*:*'",
         "//str[@name='parsedquery']='MatchAllDocsQuery(*:*)'",
         "//str[@name='parsedquery_toString']='*:*'",
-        "count(//lst[@name='explain']/*)=3",
+        "count(//lst[@name='explain']/*)=6",

Review Comment:
   How does this PR affect this assertion of an existing test?



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