Re: Max number of core in Solr multi-core

2013-01-07 Thread Parvin Gasimzade
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


Re: Max number of core in Solr multi-core

2013-01-07 Thread Erick Erickson
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



Re: Max number of core in Solr multi-core

2013-01-07 Thread Parvin Gasimzade
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.comwrote:

 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
 



RE: Max number of core in Solr multi-core

2013-01-07 Thread Jay Parashar
This is the exact approach we use in our multithreaded env. One server per
core. I think this is the recommended approach.

-Original Message-
From: Parvin Gasimzade [mailto:parvin.gasimz...@gmail.com] 
Sent: Monday, January 07, 2013 7:00 AM
To: solr-user@lucene.apache.org
Subject: Re: Max number of core in Solr multi-core

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.comwrote:

 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
 




RE: RE: Max number of core in Solr multi-core

2013-01-07 Thread Darren Govoni

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). 


brbrbr--- Original Message ---
On 1/7/2013  08:06 AM Jay Parashar wrote:brThis is the exact approach we use 
in our multithreaded env. One server per
brcore. I think this is the recommended approach.
br
br-Original Message-
brFrom: Parvin Gasimzade [mailto:parvin.gasimz...@gmail.com] 
brSent: Monday, January 07, 2013 7:00 AM

brTo: solr-user@lucene.apache.org
brSubject: Re: Max number of core in Solr multi-core
br
brI know that but my question is different. Let me ask it in this way.
br
brI have a solr with base url localhost:8998/solr and two solr core as
brlocalhost:8998/solr/core1 and localhost:8998/solr/core2.
br
brI have one baseSolr instance initialized as :
brSolrServer server = new HttpSolrServer( url );
br
brI have also create SolrServer's for each core as :
brSolrServer core1 = new HttpSolrServer( url + /core1 ); SolrServer core2 =
brnew HttpSolrServer( url + /core2 );
br
brSince there are many cores, I have to initialize SolrServer as shown above.
brIs there a way to create only one SolrServer with the base url and access
breach core using it? If it is possible, then I don't need to create new
brSolrServer for each core.
br
brOn Mon, Jan 7, 2013 at 2:39 PM, Erick Erickson
brerickerick...@gmail.comwrote:
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


Re: Max number of core in Solr multi-core

2013-01-02 Thread Erick Erickson
This is a common approach to this problem, having separate
cores keeps the apps from influencing each other when it comes
to term frequencies  etc. It also keeps the chances of returning
the wrong data do a minimum.

As to how many cores can fit, it depends (tm). There's lots of
work going on right now, see: http://wiki.apache.org/solr/LotsOfCores.

But having all those cores does allow you to expand your system
pretty easily if you do run over the limit your hardware can handle, just
move the entire core to a new machine. Only testing will tell
you where that limit is.

Best
Erick


On Wed, Jan 2, 2013 at 7:18 AM, Parvin Gasimzade parvin.gasimz...@gmail.com
 wrote:

 Hi all,

 We have a system that enables users to create applications and store data
 on their application. We want to separate the index of each application. We
 create a core for each application and search on the given application when
 user make query. Since there isn't any relation between the applications,
 this solution could perform better than the storing all index together.

 I have two questions related to this.
 1. Is this a good solution? If not could you please suggest any better
 solution?
 2. Is there a limit on the number of core that I can create on Solr? There
 will be thousands maybe more application on the system.

 P.S. This question is also asked in the
 stackoverflow
 http://stackoverflow.com/questions/14121624/max-number-of-core-in-solr-multi-core
 
 .

 Thanks,
 Parvin



Re: Max number of core in Solr multi-core

2013-01-02 Thread Per Steffensen
Furthermore, if you plan to index a lot of data per application, and 
you are using Solr 4.0.0+ (including Solr Cloud), you probably want to 
consider creating a collection per application instead of a core per 
application.


On 1/2/13 2:38 PM, Erick Erickson wrote:

This is a common approach to this problem, having separate
cores keeps the apps from influencing each other when it comes
to term frequencies  etc. It also keeps the chances of returning
the wrong data do a minimum.

As to how many cores can fit, it depends (tm). There's lots of
work going on right now, see: http://wiki.apache.org/solr/LotsOfCores.

But having all those cores does allow you to expand your system
pretty easily if you do run over the limit your hardware can handle, just
move the entire core to a new machine. Only testing will tell
you where that limit is.

Best
Erick


On Wed, Jan 2, 2013 at 7:18 AM, Parvin Gasimzade parvin.gasimz...@gmail.com

wrote:
Hi all,

We have a system that enables users to create applications and store data
on their application. We want to separate the index of each application. We
create a core for each application and search on the given application when
user make query. Since there isn't any relation between the applications,
this solution could perform better than the storing all index together.

I have two questions related to this.
1. Is this a good solution? If not could you please suggest any better
solution?
2. Is there a limit on the number of core that I can create on Solr? There
will be thousands maybe more application on the system.

P.S. This question is also asked in the
stackoverflow
http://stackoverflow.com/questions/14121624/max-number-of-core-in-solr-multi-core
.

Thanks,
Parvin