http://dev.eclipse.org/svnroot/rt/org.eclipse.smila/trunk/core/org.eclipse.smila.solr/code/Why do you manage instances? Look at the wiki documentation to see how it is. /*
Httpsolrserver is Thread-safe and if you are using the following constructor,
You *must* re-use the same instance for all requests. If instances is created on
The fly, it can cause a connection leak. The recommended practice is to keep a
Static instance of httpsolrserver per SOLR server URL and share it for all requests.
See https://issues.apache.org/jira/browse/SOLR-861 for more details
* * Goole Translation, I understand the general meaning is: httpsolrserver is thread-safe, keep each SOLR server URL httpsolrserver Static instance can prevent the connection leakage, performance also improved, save resource overhead. Google found an open source code, although they use the SOLR is not the latest version of 4.0. But patterns can be borrowed. See theSeeThis Solrserver manager class code, I think is good, took to use the http://dev.eclipse.org/svnroot/rt/org.eclipse.smila/trunk/core/ Org.eclipse.smila.solr/code/src/org/eclipse/smila/solr/solrmanager.java send links, no code, no format, too ugly http// Dev.eclipse.org/svnroot/rt/org.eclipse.smila/trunk/core/this link in the things are treasures Oh, quickly action! A simple question and answer stackoverflow-solr-instantiate Httpsolrserver with Httpclient
Httpsolrserver Instance management reference, from ORG.ECLIPSE.SMILA.SOLR