lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <s...@elyograg.org>
Subject Re: Override wt parameter
Date Fri, 28 Dec 2012 23:37:38 GMT
On 12/28/2012 3:19 PM, Manepalli, Kalyan wrote:
> Hi all,
> I am in process of upgrading SOLR from 1.4 to 3.6. The clients and the server communicate
using SOLRJ. Since SOLRJ uses javabin as response format, I want to change this to xml during
the upgrade procees. Since there are multiple clients, I tried modifying the SOLR server to
hardcore wt as xml, by modifying the incoming request. But its still not working. Any clues
on how to do this?
>
> Any advice in this regard will be really helpful

Kalyan,

Just change the parser right after you create your SolrJ server object. 
  There is no need to worry about manually changing the wt parameter - 
changing the parser will take care of that for you.  This example 
assumes you're using SolrJ 3.6 - change the object type to 
CommonsHttpSolrServer if SolrJ is version 1.4.1.

String url = "http://localhost:8983/solr"
HttpSolrServer server = new HttpSolrServer(url);
server.setParser(new XMLResponseParser())

https://wiki.apache.org/solr/Solrj#Changing_other_Connection_Settings

When you get everything all upgraded to 3.x or later, you can remove the 
call to setParser.

Thanks,
Shawn


Mime
View raw message