> SolrServer server =  new CommonsHttpSolrServer(URL);
> 
> through out the class. How can I improve the connection, in
> my case: should I need to close the server after fetching
> the result or CommonsHttpSolrServer(URL); will maintain at
> their end. There is other way: I can make this as static and
> can use through out the classes.

As wiki [1] says, you must use the same instalce through out all of the classes.

[1] http://wiki.apache.org/solr/Solrj#CommonsHttpSolrServer

Reply via email to