On 9/28/2015 4:04 PM, Arcadius Ahouansou wrote: > CloudSolrClient has zkClientTimeout/zkConnectTimeout for access to > zookeeper. > > It would be handy to also have the possibility to set something like > soTimeout/connectTimeout for accessing the solr nodes similarly to the old > non-cloud client. > > Currently, in order to set a timeout for the client to connect to solr, one > has to create a custom HttpClient. > Same goes for maxConnection.
Currently SolrJ is using HttpClient classes and methods that are deprecated as of HC 4.3. SolrJ in the latest version is using HC 4.5, which still has all that deprecated code. In order to remove HC deprecations, SolrJ must move to immutable HttpClient objects, so the current methods on HttpSolrClient that modify the HttpClient object, like setConnectionTimeout, will no longer work. All of these settings (and more) can be configured on the *requests* made through HttpClient, and this is the way that the HttpComponents project recommends writing code using their libarary, so what we really need to have is simply numbers for these settings stored in the class implementing SolrClient (like HttpSolrClient, CloudSolrClient, etc), which get passed down to the internal code that makes the request. We have an issue for removing HC deprecations, but because it's a massive undertaking requiring a fair amount of experience with new HttpComponents classes/methods, nobody has attempted to do it: https://issues.apache.org/jira/browse/SOLR-5604 Thanks, Shawn