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 SGE0 <st...@hotmail.com> on 2009/10/27 18:03:23 UTC

Solr: How to create a core from the command line ?

Hi,

currently on dev. I use following command (in a browser) to create a new
core (we use Solr in a multi-core mode):

http:\\localhost:8080\solr-rel-1-00-7064\admin\cores?action=CREATE&name=test&instanceDir=c:\data\solr\cores\test&config=c:\data\solr\cores\test\conf\solrconfig.xml&schema=c:\data\solr\cores\test\conf\schema.xml&dataDir=c:\data\solr\cores_data\test

We are about to move to prod. environment and my question is how I can
create a new core from the command line (on prod we can only use the shell)
? 

Any ideas ?

Regards,

S.

-- 
View this message in context: http://www.nabble.com/Solr%3A-How-to-create-a-core-from-the-command-line---tp26081356p26081356.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr: How to create a core from the command line ?

Posted by Chris Hostetter <ho...@fucit.org>.
: More appropriate would be to use a commandline utility like 'curl' to 
: create the new cores.
: 
:     curl 'http://production.example.com:8080/solr/admin/cores?rest-of-request'

More specificly: HTTP is the only way to admin a Solr port while running.  
All of the existing scripts htat come with solr (commit, optimize, etc...) 
are just shell wrappers arround curl commands that hit the default URL for 
those operations.





-Hoss


Re: Solr: How to create a core from the command line ?

Posted by Jeremy Hinegardner <je...@hinegardner.org>.
On Tue, Oct 27, 2009 at 10:03:23AM -0700, SGE0 wrote:
> 
> Hi,
> 
> currently on dev. I use following command (in a browser) to create a new
> core (we use Solr in a multi-core mode):
> 
> http:\\localhost:8080\solr-rel-1-00-7064\admin\cores?action=CREATE&name=test&instanceDir=c:\data\solr\cores\test&config=c:\data\solr\cores\test\conf\solrconfig.xml&schema=c:\data\solr\cores\test\conf\schema.xml&dataDir=c:\data\solr\cores_data\test
> 
> We are about to move to prod. environment and my question is how I can
> create a new core from the command line (on prod we can only use the shell)
> ? 
> 
> Any ideas ?

You can still use the browser from some other machine hitting:

    http://production.example.com:8080/solr/admin/cores?rest-of-request

More appropriate would be to use a commandline utility like 'curl' to 
create the new cores.

    curl 'http://production.example.com:8080/solr/admin/cores?rest-of-request'

enjoy,

-jeremy

-- 
========================================================================
 Jeremy Hinegardner                              jeremy@hinegardner.org 


Re: Solr: How to create a core from the command line ?

Posted by Jason Venner <jv...@ning.com>.
wget or curl?
--
Jason Venner
Author: Pro Hadoop A howto guide to learning and using hadoop and map/reduce
http://www.prohadoopbook.com/ a Ning network for Hadoop using Professionals




On 10/27/09 10:03 AM, "SGE0" <st...@hotmail.com> wrote:

> 
> Hi,
> 
> currently on dev. I use following command (in a browser) to create a new
> core (we use Solr in a multi-core mode):
> 
> http:\\localhost:8080\solr-rel-1-00-7064\admin\cores?action=CREATE&name=test&i
> nstanceDir=c:\data\solr\cores\test&config=c:\data\solr\cores\test\conf\solrcon
> fig.xml&schema=c:\data\solr\cores\test\conf\schema.xml&dataDir=c:\data\solr\co
> res_data\test
> 
> We are about to move to prod. environment and my question is how I can
> create a new core from the command line (on prod we can only use the shell)
> ? 
> 
> Any ideas ?
> 
> Regards,
> 
> S.