Currently, I am using below piece of logic for every query to Solr using CloudSolrServer API of solrj library.
CloudSolrServer server = new CloudSolrServer(<zookeeper_quorum>);
server.connect();
Once I got the response, I am just closing the connection.
server.shutdown();
I know this is not the correct way as I shouldn't open connection for every search. I wanted to create a connection pool (thread pool) in my code and query Solr. But, just wondering whether Solr would have implemented a thread pool internally in SolrJ client library to support this usage. If so, how to control the number of threads here?