How to reindex a document


#1

I am trying to reindex url-2016.03.01 (index) into a new index (adg-2016.03.01) and I am getting the following error. The reason is the old index was created before we made some changes to the template.
Please help

curl -XPUT 'http://localhost:9200/_reindex?index=adg-2016.03.01&type=*&searchIndex=url-2016.03.01'
{"error":"InvalidIndexNameException[[_reindex] Invalid index name [reindex], must not start with '']","status":400}


(Nik Everett) #2

There is a _reindex feature going into Elasticsearch 2.3 which has yet to be released but its usage doesn't look quite like that. Are you using some other plugin?


#3

I am using ES 1.7.1
I was trying to follow these steps mentioned on this link https://github.com/karussell/elasticsearch-reindex


#4

I am just trying to reindex the data from one index to a new index (not big)
What is the best way to do this?


(David Pilato) #5

In case it helps: http://david.pilato.fr/blog/2015/05/20/reindex-elasticsearch-with-logstash/


#6

is there another way to do it without using logstash. I only need to reindex the data on one index?


(David Pilato) #7

There are some scripts available on internet and on this forum. I'm pretty sure you can find examples searching "reindex" here.

I know @warkolm posted a Gist several times.


(David Pilato) #8

BTW your error message indicates to me that the plugin is not loaded, means: you did not restart the nodes.


#9

Thank you David, I used logstash as you suggested and it works fine.


(system) #10