Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding new core into Solr

Tags:

solr

I want to add a new core into Solr installed on my local host by passing following URL:

http://localhost:8983/solr/admin/cores?action=CREATE&name=SNGAlias&instanceDir=D:\SNGAlias\solr\ms2&config=solrconfig.xml&schema=schema.xml&dataDir=data

But getting the following Error:

Error CREATEing SolrCore 'SNGAlias': Could not create a new core in D:\SNGAlias\solr\ms2\as another core is already defined there

like image 710
Rabindra Avatar asked Jul 31 '14 06:07

Rabindra


1 Answers

The existent file core.properties needs to be removed first.

In unix you could do:

sudo cp -r <solr-cores-dir>/<existent-core> <solr-cores-dir>/<new-core>
sudo chown -R <system-solr-user> <solr-cores-dir>/<new-core>
sudo rm <solr-cores-dir>/<new-core>/core.properties
curl 'http://localhost:8983/solr/admin/cores?action=CREATE&name=<new-core>&instanceDir=<new-core>&config=solrconfig.xml&schema=schema.xml&dataDir=data'
like image 58
Amadu Bah Avatar answered Oct 16 '22 06:10

Amadu Bah