It turns out there is a better way to do this. It does not require code change
in Solr, if you are using log4j. However, you need to migrate to log4j.xml file
format. The solution is to use the filter feature. Here is what my console
appender looks like with the filter:
In my use case, I have a number of shards where a query would run as
distributed search. I am not using Solr Cloud, I have just a Solr server. Now,
when the search runs, I see one entry for each shard query as well as the
finally collective search query response. As the results, I am ending u