You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by nagarjuna <na...@gmail.com> on 2011/08/11 13:36:09 UTC
how to change default response fromat as json in solr
configuration?
Hi everybody,
when ever i enter search term in solr i am able to getting response in XML
format(default),i can change that response by adding "&wt=json" to the url
.....but instead of that i need to change the default format from XML to
JSON......how can i do that.....please help me
Thanks in advance.......
--
View this message in context: http://lucene.472066.n3.nabble.com/how-to-change-default-response-fromat-as-json-in-solr-configuration-tp3245629p3245629.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: how to change default response fromat as json in solr configuration?
Posted by Erik Hatcher <er...@gmail.com>.
You can set default="true" in solrconfig on the JSON response writer, like this:
<queryResponseWriter name="json"
default="true"
class="solr.JSONResponseWriter" />
Or you can add <str name="wt">json</str> to any request handler definitions.
Erik
On Aug 11, 2011, at 07:36 , nagarjuna wrote:
> Hi everybody,
>
> when ever i enter search term in solr i am able to getting response in XML
> format(default),i can change that response by adding "&wt=json" to the url
> .....but instead of that i need to change the default format from XML to
> JSON......how can i do that.....please help me
>
>
> Thanks in advance.......
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/how-to-change-default-response-fromat-as-json-in-solr-configuration-tp3245629p3245629.html
> Sent from the Solr - User mailing list archive at Nabble.com.