Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I rename a core created in Solr?

Tags:

rename

solr

I must create some indexes using Solr. I have created a lot of cores with bin/solr create command:

bin/solr create -c core_name

After that, I added some documents using bin/post command:

bin/post -c core_name /documents_path/

Now I must rename some cores to make some tests but I don't know how I can do it.

I cannot simply delete the core and re-add the core with the correct name, because add a lot of documents takes a long time.

How can I rename the cores using command line commands as in the operations creation and addition of the documents??

Thank you!!

like image 763
Matteo Bernardon Avatar asked Jan 20 '16 00:01

Matteo Bernardon


1 Answers

The CoreAdminHandler (which is available by default in 5.x) is the preferred external interface for making changes to cores.

To rename a core, issue a RENAME command:

http://localhost:8983/solr/admin/cores?action=RENAME&core=oldname&other=newname
like image 170
MatsLindh Avatar answered Sep 21 '22 16:09

MatsLindh