You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Tharindu Mathew <mc...@gmail.com> on 2010/10/15 10:48:37 UTC

How do you programatically create new cores?

Hi everyone,

I'm a newbie at this and I can't figure out how to do this after going
through http://wiki.apache.org/solr/CoreAdmin?

Any sample code would help a lot.

Thanks in advance.

-- 
Regards,

Tharindu

AW: How do you programatically create new cores?

Posted by Bastian <bs...@magix.net>.
A http-get call is simply made by entering the url into your browser, like
shown in the example in the wiki:

http://localhost:8983/solr/admin/cores?action=CREATE&name=coreX&instanceDir=
path_to_instance_directory&config=config_file_name.xml&schema=schem_file_nam
e.xml&dataDir=data 

-----Ursprüngliche Nachricht-----
Von: Tharindu Mathew [mailto:mccloud35@gmail.com] 
Gesendet: Sonntag, 17. Oktober 2010 18:07
An: solr-user@lucene.apache.org
Cc: solr-user@lucene.apache.org
Betreff: Re: How do you programatically create new cores?

Hi Marc, 

Thanks for the reply. 

So as I understand I need to make a http get call with an action parameter
set to create to dynamically create a core? I do not see an API to do this
anywhere. 

On Oct 17, 2010, at 3:54 PM, Marc Sturlese <ma...@gmail.com> wrote:

> 
> You have to create the core's folder with it's conf inside the Solr home.
> Once done you can call the create action of the admin handler:
> http://wiki.apache.org/solr/CoreAdmin#CREATE
> If you need to dinamically create, start and stop lots of cores 
> there's this patch, but don't know about it's current state:
> http://wiki.apache.org/solr/LotsOfCores
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/How-do-you-programatically-create-n
> ew-cores-tp1706487p1718648.html Sent from the Solr - User mailing list 
> archive at Nabble.com.


Re: How do you programatically create new cores?

Posted by Tharindu Mathew <mc...@gmail.com>.
Hi Marc, 

Thanks for the reply. 

So as I understand I need to make a http get call with an action parameter set to create to dynamically create a core? I do not see an API to do this anywhere. 

On Oct 17, 2010, at 3:54 PM, Marc Sturlese <ma...@gmail.com> wrote:

> 
> You have to create the core's folder with it's conf inside the Solr home.
> Once done you can call the create action of the admin handler:
> http://wiki.apache.org/solr/CoreAdmin#CREATE
> If you need to dinamically create, start and stop lots of cores there's this
> patch, but don't know about it's current state:
> http://wiki.apache.org/solr/LotsOfCores
> 
> -- 
> View this message in context: http://lucene.472066.n3.nabble.com/How-do-you-programatically-create-new-cores-tp1706487p1718648.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: How do you programatically create new cores?

Posted by Marc Sturlese <ma...@gmail.com>.
You have to create the core's folder with it's conf inside the Solr home.
Once done you can call the create action of the admin handler:
http://wiki.apache.org/solr/CoreAdmin#CREATE
If you need to dinamically create, start and stop lots of cores there's this
patch, but don't know about it's current state:
http://wiki.apache.org/solr/LotsOfCores

-- 
View this message in context: http://lucene.472066.n3.nabble.com/How-do-you-programatically-create-new-cores-tp1706487p1718648.html
Sent from the Solr - User mailing list archive at Nabble.com.