I know that but my question is different. Let me ask it in this way. I have a solr with base url localhost:8998/solr and two solr core as localhost:8998/solr/core1 and localhost:8998/solr/core2.
I have one baseSolr instance initialized as : SolrServer server = new HttpSolrServer( url ); I have also create SolrServer's for each core as : SolrServer core1 = new HttpSolrServer( url + "/core1" ); SolrServer core2 = new HttpSolrServer( url + "/core2" ); Since there are many cores, I have to initialize SolrServer as shown above. Is there a way to create only one SolrServer with the base url and access each core using it? If it is possible, then I don't need to create new SolrServer for each core. On Mon, Jan 7, 2013 at 2:39 PM, Erick Erickson <erickerick...@gmail.com>wrote: > This might help: > https://wiki.apache.org/solr/Solrj#HttpSolrServer > > Note that the associated SolrRequest takes the path, I presume relative to > the base URL you initialized the HttpSolrServer with. > > Best > Erick > > > On Mon, Jan 7, 2013 at 7:02 AM, Parvin Gasimzade < > parvin.gasimz...@gmail.com > > wrote: > > > Thank you for your responses. I have one more question related to Solr > > multi-core. > > By using SolrJ I create new core for each application. When user wants to > > add data or make query on his application, I create new HttpSolrServer > for > > this core. In this scenario there will be many running HttpSolrServer > > instances. > > > > Is there a better solution? Does it cause a problem to run many instances > > at the same time? > > > > On Wed, Jan 2, 2013 at 5:35 PM, Per Steffensen <st...@designware.dk> > > wrote: > > > > > g a collection per application instead of a core > > >