# How to reindex a document

**URL:** <https://discuss.elastic.co/t/how-to-reindex-a-document/43812>\
**Category:** Elasticsearch\
**Created:** [March 8, 2016, 5:31pm UTC](https://discuss.elastic.co/t/how-to-reindex-a-document/43812 "2016-03-08T17:31:50Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![genesis](https://avatars.discourse-cdn.com/v4/letter/g/96bed5/32.png) [@genesis](https://discuss.elastic.co/u/genesis)\
**Post date:** [March 8, 2016, 5:31pm UTC](https://discuss.elastic.co/t/how-to-reindex-a-document/43812/1 "2016-03-08T17:31:50Z")

</div>

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](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}

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [March 8, 2016, 5:47pm UTC](https://discuss.elastic.co/t/how-to-reindex-a-document/43812/2 "2016-03-08T17:47:42Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![genesis](https://avatars.discourse-cdn.com/v4/letter/g/96bed5/32.png) [@genesis](https://discuss.elastic.co/u/genesis)\
**Post date:** [March 8, 2016, 5:53pm UTC](https://discuss.elastic.co/t/how-to-reindex-a-document/43812/3 "2016-03-08T17:53:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![genesis](https://avatars.discourse-cdn.com/v4/letter/g/96bed5/32.png) [@genesis](https://discuss.elastic.co/u/genesis)\
**Post date:** [March 8, 2016, 5:57pm UTC](https://discuss.elastic.co/t/how-to-reindex-a-document/43812/4 "2016-03-08T17:57:12Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 8, 2016, 6:43pm UTC](https://discuss.elastic.co/t/how-to-reindex-a-document/43812/5 "2016-03-08T18:43:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![genesis](https://avatars.discourse-cdn.com/v4/letter/g/96bed5/32.png) [@genesis](https://discuss.elastic.co/u/genesis)\
**Post date:** [March 8, 2016, 6:50pm UTC](https://discuss.elastic.co/t/how-to-reindex-a-document/43812/6 "2016-03-08T18:50:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 8, 2016, 7:49pm UTC](https://discuss.elastic.co/t/how-to-reindex-a-document/43812/7 "2016-03-08T19:49:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 8, 2016, 7:50pm UTC](https://discuss.elastic.co/t/how-to-reindex-a-document/43812/8 "2016-03-08T19:50:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![genesis](https://avatars.discourse-cdn.com/v4/letter/g/96bed5/32.png) [@genesis](https://discuss.elastic.co/u/genesis)\
**Post date:** [March 10, 2016, 2:51pm UTC](https://discuss.elastic.co/t/how-to-reindex-a-document/43812/9 "2016-03-10T14:51:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:09pm UTC](https://discuss.elastic.co/t/how-to-reindex-a-document/43812/10 "2017-07-05T23:09:26Z")

</div>


