Why do you want to do this? This sounds like an XY problem, you think you’re going to solve some problem X by doing Y. Y in this case is setting the numServersToTry, but you haven’t explained what X, the problem you’re trying to solve is.
Offhand, this seems like a terrible idea. If you’re requests are timing out, what purpose is served by _not_ trying the next one on the list? With, of course, a much longer timeout interval… The code is structured that way on the theory that you want the request to succeed and the system needs to be tolerant of momentary glitches due to network congestion, reading indexes into memory, etc. Bypassing that assumption needs some justification…. Best, Erick > On Dec 18, 2020, at 6:23 AM, kshitij tyagi <kshitij.s...@gmail.com> wrote: > > Hi, > > We have a Solrcloud setup and are using CloudSolrClient, What we are seeing > is if socketTimeoutOccurs then the same request is sent to other solr > server. > > So if I set socketTimeout to a very low value say 100ms and my query takes > around 200ms then client tries to query second server, then next and so > on(basically all available servers with same query). > > I see that we have *numServersToTry* in LBSolrClient class but not able to > set this using CloudSolrClient. Using this we can restrict the above > feature. > > Should a jira be created to support numServersToTry by CloudSolrClient? Or > is there any other way to control the request to other solr servers?. > > Regards, > kshitij