jaykay12 commented on code in PR #5175:
URL: https://github.com/apache/solr/pull/5175#discussion_r4329395425


##########
solr/core/src/java/org/apache/solr/handler/admin/api/GetConfig.java:
##########
@@ -70,9 +70,22 @@ public class GetConfig extends JerseyResource implements 
ConfigApi.Get {
 
   public static final String REQUEST_HANDLERS = "requestHandlers";
 
-  // v2-only renames: external (URL/response-key) component name -> internal 
SolrConfig section
-  // name. v1's GET /config/{component} keeps using the internal names 
unchanged.
+  // v2-only renames for the GET /config/{component} and 
/config/{component}/{componentName}
+  // paths: external (URL/response-key) component name -> internal SolrConfig 
section name. v1's
+  // GET /config/{component} keeps using the internal names unchanged. 
requestHandler is NOT here:
+  // it never routes through these paths (it has its own dedicated 
/config/requestHandlers
+  // endpoint instead, since handler names can contain '/'), so including it 
would wrongly imply
+  // ConfigApi.Get#getConfigComponent(ByName) can resolve it.
   private static final Map<String, String> EXTERNAL_TO_INTERNAL_COMPONENT_NAME 
=
+      Map.of(
+          "searchComponents", "searchComponent",
+          "queryResponseWriters", "queryResponseWriter");
+
+  // v2-only renames for the full GET /config dump's top-level section keys. A 
superset of
+  // EXTERNAL_TO_INTERNAL_COMPONENT_NAME above: it also covers requestHandler, 
which has its own
+  // dedicated endpoint (and thus its own plural name) but isn't part of the 
generic
+  // /config/{component} path routing.

Review Comment:
   thanks @epugh , lgtm now. 👍🏽 



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