epugh commented on code in PR #4073:
URL: https://github.com/apache/solr/pull/4073#discussion_r2725501072


##########
solr/core/src/java/org/apache/solr/core/SolrCore.java:
##########
@@ -3148,11 +3116,49 @@ default String getContentType() {
   }
 
   /**
-   * Configure the query response writers. There will always be a default 
writer; additional writers
-   * may also be configured.
+   * Gets a response writer suitable for admin/container-level requests.
+   *
+   * @param writerName the writer name, or null for default
+   * @return the response writer, never null
+   * @deprecated Use {@link
+   *     
org.apache.solr.response.BuiltInResponseWriterRegistry#getWriter(String)} 
instead.
+   */
+  @Deprecated
+  public static QueryResponseWriter getAdminResponseWriter(String writerName) {
+    return 
org.apache.solr.response.BuiltInResponseWriterRegistry.getWriter(writerName);
+  }
+
+  /**
+   * Initializes query response writers. Response writers from {@code 
ImplicitPlugins.json} may also
+   * be configured.
    */
   private void initWriters() {
-    responseWriters.init(DEFAULT_RESPONSE_WRITERS, this);
+    // Build default writers map from implicit plugins
+    Map<String, QueryResponseWriter> defaultWriters = new HashMap<>();
+
+    // Load writers from ImplicitPlugins.json
+    List<PluginInfo> implicitWriters = getImplicitResponseWriters();
+    for (PluginInfo info : implicitWriters) {
+      try {
+        QueryResponseWriter writer =
+            createInstance(
+                info.className,
+                QueryResponseWriter.class,
+                "queryResponseWriter",
+                null,

Review Comment:
   this was NOT a change.   Only in one instance (that of 
`PackagePluginHolder`) do they get a core.   I think it's a refactoring 
opportunity.



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