[
https://issues.apache.org/jira/browse/SOLR-4715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13670650#comment-13670650
]
Shawn Heisey commented on SOLR-4715:
------------------------------------
[~hupadhyay], the following code **MIGHT** allow you to change the response
parser back to XML before this issue is implemented. I have not tested this,
and I would be very curious about whether it works for you. It also changes a
couple of HttpClient parameters, but you could remove those two lines.
{code}
import org.apache.http.client.HttpClient;
import org.apache.solr.client.solrj.ResponseParser;
import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.CloudSolrServer;
import org.apache.solr.client.solrj.impl.HttpClientUtil;
import org.apache.solr.client.solrj.impl.LBHttpSolrServer;
import org.apache.solr.client.solrj.impl.XMLResponseParser;
import org.apache.solr.common.params.ModifiableSolrParams;
public class TestStuff
{
void test() throws MalformedURLException
{
String zkHost = "";
ModifiableSolrParams params = new ModifiableSolrParams();
params.set(HttpClientUtil.PROP_MAX_CONNECTIONS, 1000);
params.set(HttpClientUtil.PROP_MAX_CONNECTIONS_PER_HOST, 200);
HttpClient client = HttpClientUtil.createClient(params);
ResponseParser parser = new XMLResponseParser();
LBHttpSolrServer lbServer = new LBHttpSolrServer(client, parser,
"http://localhost/solr");
lbServer.removeSolrServer("http://localhost/solr");
SolrServer server = new CloudSolrServer(zkHost, lbServer);
}
}
{code}
> CloudSolrServer does not provide support for setting underlying server
> properties
> ---------------------------------------------------------------------------------
>
> Key: SOLR-4715
> URL: https://issues.apache.org/jira/browse/SOLR-4715
> Project: Solr
> Issue Type: Bug
> Affects Versions: 4.3
> Reporter: Hardik Upadhyay
> Assignee: Shawn Heisey
> Labels: solr, solrj
>
> CloudSolrServer (and LBHttpSolrServer) do not allow the user to set
> underlying HttpSolrServer and HttpClient settings.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]