This should be clarified some. In the "client" API, SolrServer is represents a 
connection to a single server backend/endpoint and should be re-used where possible.

The approach being discussed is to have one "client" connection (represented by SolrServer class) per solr core, all residing in a "single" solr server (as is the case below, but not required).
<br><br><br>------- Original Message -------
On 1/7/2013  08:06 AM Jay Parashar wrote:<br>This is the exact approach we use 
in our multithreaded env. One server per
<br>core. I think this is the recommended approach.
<br>
<br>-----Original Message-----
<br>From: Parvin Gasimzade [mailto:parvin.gasimz...@gmail.com] <br>Sent: Monday, January 07, 2013 7:00 AM
<br>To: solr-user@lucene.apache.org
<br>Subject: Re: Max number of core in Solr multi-core
<br>
<br>I know that but my question is different. Let me ask it in this way.
<br>
<br>I have a solr with base url localhost:8998/solr and two solr core as
<br>localhost:8998/solr/core1 and localhost:8998/solr/core2.
<br>
<br>I have one baseSolr instance initialized as :
<br>SolrServer server = new HttpSolrServer( url );
<br>
<br>I have also create SolrServer's for each core as :
<br>SolrServer core1 = new HttpSolrServer( url + "/core1" ); SolrServer core2 =
<br>new HttpSolrServer( url + "/core2" );
<br>
<br>Since there are many cores, I have to initialize SolrServer as shown above.
<br>Is there a way to create only one SolrServer with the base url and access
<br>each core using it? If it is possible, then I don't need to create new
<br>SolrServer for each core.
<br>
<br>On Mon, Jan 7, 2013 at 2:39 PM, Erick Erickson
<br><erickerick...@gmail.com>wrote:
<br>
<br>> This might help:
<br>> https://wiki.apache.org/solr/Solrj#HttpSolrServer
<br>>
<br>> Note that the associated SolrRequest takes the path, I presume <br>> relative to the base URL you initialized the HttpSolrServer with.
<br>>
<br>> Best
<br>> Erick
<br>>
<br>>
<br>> On Mon, Jan 7, 2013 at 7:02 AM, Parvin Gasimzade < <br>> parvin.gasimz...@gmail.com
<br>> > wrote:
<br>>
<br>> > Thank you for your responses. I have one more question related to <br>> > Solr multi-core. <br>> > By using SolrJ I create new core for each application. When user <br>> > wants to add data or make query on his application, I create new <br>> > HttpSolrServer
<br>> for
<br>> > this core. In this scenario there will be many running <br>> > HttpSolrServer instances.
<br>> >
<br>> > Is there a better solution? Does it cause a problem to run many <br>> > instances at the same time?
<br>> >
<br>> > On Wed, Jan 2, 2013 at 5:35 PM, Per Steffensen <st...@designware.dk>
<br>> > wrote:
<br>> >
<br>> > > g a collection per application instead of a core
<br>> >
<br>>
<br>
<br>

Reply via email to