Hi,

I got the solution to the above problem . Sharing the code so that it could
help people in future

PoolingClientConnectionManager poolingClientConnectionManager = new
PoolingClientConnectionManager();
poolingClientConnectionManager.setMaxTotal(2);
poolingClientConnectionManager.setDefaultMaxPerRoute(1);
HttpClient httpClient = (HttpClient)new
DefaultHttpClient(poolingClientConnectionManager);
LBHttpSolrServer lbServer = new LBHttpSolrServer(httpClient);
server = new CloudSolrServer("zkhost", lbServer);
server.setDefaultCollection(collectionName);

Thanks a lot to every1 in the thread chain. Your suggestions helped a lot



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Is-it-possible-to-find-a-leader-from-a-list-of-cores-in-solr-via-java-code-tp4074994p4078012.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to