Search code examples
solr

How to make SOLR 8.11.1 Ping api call return xml instead of json


I have an app that accesses cores on a SOLR 4.10.2 instance. I am updating to SOLR 8.11.1.

My app calls the ping api in 4.10.2: the results are returned in xml format. When I make the same call in SOLR 8.11.1, the results are returned in json format.

Is there a setting (in solrconfig.xml? or at a SOLR core ...) that will set the default result type to xml in 8.11.1?


Solution

  • The default queryResponseWriter can be configured in the solrconfig.xml for the core.

    I was looking at the solrconfig.xml for the core, and there is a commented section that shows how to set the default as xml:

     <queryResponseWriter name="xml"
                          default="true"
                          class="solr.XMLResponseWriter" />
    

    I moved it out of the comment, reloaded the core, and ping now returns xml.