Httpsolrserver Instance management reference, from ORG.ECLIPSE.SMILA.SOLR

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.