Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
4.9
-
None
Description
I recently found out about the ConcurrentUpdateSolrServer and I'm trying to switch from the HttpSolrServer for batch processing.
However, our Solr is protected with basic authentication, so we're using a custom HttpClient that sends the credentials with it.
This works fine with HttpSolrServer, but not with ConcurrentUpdateSolrServer. The ConcurrentUpdateSolrServer uses this.server.setFollowRedirects(false), but this triggers getParams() on the HttpClient which throws an `UnSupportedOperationException` when you use the InternalHttpClient which is the default type when using the HttpClientBuilder.
The stack trace produced is:
Caused by: java.lang.UnsupportedOperationException at org.apache.http.impl.client.InternalHttpClient.getParams(InternalHttpClient.java:206) at org.apache.solr.client.solrj.impl.HttpClientUtil.setFollowRedirects(HttpClientUtil.java:267) at org.apache.solr.client.solrj.impl.HttpSolrServer.setFollowRedirects(HttpSolrServer.java:658) at org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer.<init>(ConcurrentUpdateSolrServer.java:124) at org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer.<init>(ConcurrentUpdateSolrServer.java:115) at org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer.<init>(ConcurrentUpdateSolrServer.java:105)
It's annoying of course, and I don't know who is to be "blamed". I reported it here anyways because the getParams() method is deprecated.
I'm using SolrJ 4.9, but I also noticed that it's neither working on 4.7 or 4.8 or any version using HttpClient 4.3.