kotman12 commented on code in PR #2382:
URL: https://github.com/apache/solr/pull/2382#discussion_r1840339347


##########
solr/core/src/java/org/apache/solr/handler/component/DebugComponent.java:
##########
@@ -115,6 +116,12 @@ public void process(ResponseBuilder rb) throws IOException 
{
         info.add("facet-debug", fdebug.getFacetDebugInfo());
       }
 
+      ReverseSearchDebugInfo rsdebug =
+          (ReverseSearchDebugInfo) 
(rb.req.getContext().get(ReverseSearchDebugInfo.KEY));
+      if (rsdebug != null) {
+        info.add("reverse-search-debug", rsdebug.getReverseSearchDebugInfo());
+      }
+

Review Comment:
   I like it. It would be nice it you didn't have to use inheritance because it 
makes "layering" debug components challenging (i.e. if the debug component 
could iterate over other customInfoProviders to collect custom debug metrics..) 
. But that's a hypothetical problem since nothing that requires this exists yet 
and the DI mechanism in solr is a bit painful right now so doing composition is 
probably messier.
   
   One question I have is why not keep the `ReverseSearchDebugComponent` in the 
default component list for the reverseSearchHandler? The searchHandler includes 
`DebugComponent` in its default components so I would think we'd want to keep 
that consistent.



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