You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@solr.apache.org by "Heller, George A III CTR (USA)" <ge...@mail.mil.INVALID> on 2022/04/20 15:30:03 UTC

How do you get SolrCloud to return queries in XML instead of JSON

I was able to get stand-alone Solr to return queries in XML instead of JSON by editing the solrconfig.xml for each core and adding the following:

<queryResponseWriter name="xml"

               default="true"

class="solr.XMLResponseWriter" />"

 

In SolrCloud, the solr cores do not have a conf folder or a solrconfig.xml file in their conf folders.

 

What do I need to do to get queries retuened in XML like our apps need?

 

Thanks,

George

 

 

 


Re: How do you get SolrCloud to return queries in XML instead of JSON

Posted by Houston Putman <ho...@apache.org>.
Hello George,

You should be able to use the URL Param "wt=xml" to get responses in XML
format.

In SolrCloud, "solrconfig.xml" is managed via ConfigSets, so any collection
you create will have an associated configSet.
So you make xml the default response writer by default the same way.

In order to create or modify a configSet, please refer to the ref-guide.
https://solr.apache.org/guide/8_11/config-sets.html#configsets-in-solrcloud-mode

P.S. In the future, please do not send questions to both the dev list and
the user list. Please use the user list only when asking questions about
Solr usage.

- Houston

On Wed, Apr 20, 2022 at 11:31 AM Heller, George A III CTR (USA)
<ge...@mail.mil.invalid> wrote:

> I was able to get stand-alone Solr to return queries in XML instead of
> JSON by editing the solrconfig.xml for each core and adding the following:
>
> <queryResponseWriter name="xml"
>
>                default="true"
>
> class="solr.XMLResponseWriter" />”
>
>
>
> In SolrCloud, the solr cores do not have a conf folder or a solrconfig.xml
> file in their conf folders.
>
>
>
> What do I need to do to get queries retuened in XML like our apps need?
>
>
>
> Thanks,
>
> George
>
>
>
>
>
>
>

Re: How do you get SolrCloud to return queries in XML instead of JSON

Posted by Walter Underwood <wu...@wunderwood.org>.
Add wt=xml to requests or set it as default in the request handler spec, like this:


<lst name="defaults">
  <str name=“wt”>xml</str>
</lst>

I’m deleting the dev list from my response because this is not appropriate for that list. Please only use the users list for usage questions.

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)

> On Apr 20, 2022, at 8:30 AM, Heller, George A III CTR (USA) <ge...@mail.mil.INVALID> wrote:
> 
> I was able to get stand-alone Solr to return queries in XML instead of JSON by editing the solrconfig.xml for each core and adding the following:
> <queryResponseWriter name="xml"
>                default="true"
> class="solr.XMLResponseWriter" />”
>  
> In SolrCloud, the solr cores do not have a conf folder or a solrconfig.xml file in their conf folders.
>  
> What do I need to do to get queries retuened in XML like our apps need?
>  
> Thanks,
> George