# Reindex Data

**URL:** <https://discuss.elastic.co/t/reindex-data/59671>\
**Category:** Elasticsearch\
**Created:** [September 2, 2016, 1:58pm UTC](https://discuss.elastic.co/t/reindex-data/59671 "2016-09-02T13:58:27Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![veve90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/veve90/32/6517_2.png) [@veve90](https://discuss.elastic.co/u/veve90)\
**Post date:** [September 2, 2016, 1:58pm UTC](https://discuss.elastic.co/t/reindex-data/59671/1 "2016-09-02T13:58:27Z")

</div>

Hello,

I'm trying to use the /\_reindex API with elasticsearch 5.0.0-alpha1 and  
with the query:

```
POST /_reindex
{
  "source": {
    "index": "existing_index"
  },
  "dest": {
    "index": "new_index"
  }
}

```

I get:

> {  
> "error": {  
> "root\_cause": [  
> {  
> "type": " **illegal\_argument\_exception**",  
> "reason": "**unknown setting [index.dest.index]**"  
> }  
> ],  
> "type": "illegal\_argument\_exception",  
> "reason": "unknown setting [index.dest.index]"  
> },  
> "status": 400  
> }

What should I do?

Thank you!

---

<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:** [September 2, 2016, 2:15pm UTC](https://discuss.elastic.co/t/reindex-data/59671/2 "2016-09-02T14:15:28Z")

</div>

I believe you haven't installed the reindex module. This comes by default if you use Elasticsearch in the tar, zip, rpm, or deb distribution. Usually I see this problem when folks try to run Elasticsearch embedded which [isn't supported](https://www.elastic.co/blog/elasticsearch-the-server).

This error message is because without the plugin installed `POST /_reindex` looks a request to create an index.

We really should treat APIs that start with `_` like that as 404s rather than index creations....

---

<div class="post-metadata">

**Author:** ![veve90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/veve90/32/6517_2.png) [@veve90](https://discuss.elastic.co/u/veve90)\
**Post date:** [September 2, 2016, 2:45pm UTC](https://discuss.elastic.co/t/reindex-data/59671/3 "2016-09-02T14:45:21Z")

</div>

I installed Elasticsearch with yum install elasticsearch with a repository:

```
$ sudo cat /etc/yum.repos.d/elasticsearch.repo
[elasticsearch-5.x]
name=Elasticsearch repository for 5.x packages
baseurl=http://packages.elastic.co/elasticsearch/5.x/centos
gpgcheck=1
gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
enabled=1

```

(I folowed the tutorial below and then I updated my repository and did a yum update)

> **[How To Install Elasticsearch, Logstash, and Kibana (ELK Stack) on CentOS 7 |...](https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-centos-7)**
>
> In this tutorial, we will go over the installation of the Elasticsearch ELK Stack on CentOS 7—that is, Elasticsearch 2.1.x, Logstash 2.1.x, and Kibana 4.3.x. We will also show you how to configure it to gather and visualize the syslogs of your...

Can I install the plugin afterwards?

Thank you!

---

<div class="post-metadata">

**Author:** ![veve90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/veve90/32/6517_2.png) [@veve90](https://discuss.elastic.co/u/veve90)\
**Post date:** [September 2, 2016, 3:26pm UTC](https://discuss.elastic.co/t/reindex-data/59671/4 "2016-09-02T15:26:53Z")

</div>

In fact, from what I see there is no reindex module in 5.0.0-alpha1  
[https://maven-repository.com/artifact/org.elasticsearch/elasticsearch/5.0.0-alpha1](https://maven-repository.com/artifact/org.elasticsearch/elasticsearch/5.0.0-alpha1)  
but there is one in alpha5  
[https://maven-repository.com/artifact/org.elasticsearch/elasticsearch/5.0.0-alpha5](https://maven-repository.com/artifact/org.elasticsearch/elasticsearch/5.0.0-alpha5)

..

Thank you!

---

<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:** [September 2, 2016, 3:40pm UTC](https://discuss.elastic.co/t/reindex-data/59671/5 "2016-09-02T15:40:49Z")

</div>

I think that is a maven packaging problem we had in early 5.0 alphas.

Do you see a reindex directory in Elasticsearch's `modules` directory?

---

<div class="post-metadata">

**Author:** ![veve90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/veve90/32/6517_2.png) [@veve90](https://discuss.elastic.co/u/veve90)\
**Post date:** [September 2, 2016, 3:48pm UTC](https://discuss.elastic.co/t/reindex-data/59671/6 "2016-09-02T15:48:53Z")

</div>

No, I have nothing in the module directory...

---

<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:** [September 2, 2016, 4:28pm UTC](https://discuss.elastic.co/t/reindex-data/59671/7 "2016-09-02T16:28:21Z")

</div>

Yeah, so you don't have reindex installed. I don't know _why_ you don't have reindex installed. It certainly comes with the rpm. Can you check if installing encountered an error somehow? Maybe removing and reinstalling?

---

<div class="post-metadata">

**Author:** ![veve90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/veve90/32/6517_2.png) [@veve90](https://discuss.elastic.co/u/veve90)\
**Post date:** [September 2, 2016, 4:29pm UTC](https://discuss.elastic.co/t/reindex-data/59671/8 "2016-09-02T16:29:32Z")

</div>

I don't want to loose my indexed data.. is there a way to remove and reinstall wihout loosing my data?

---

<div class="post-metadata">

**Author:** ![veve90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/veve90/32/6517_2.png) [@veve90](https://discuss.elastic.co/u/veve90)\
**Post date:** [September 2, 2016, 4:41pm UTC](https://discuss.elastic.co/t/reindex-data/59671/9 "2016-09-02T16:41:16Z")

</div>

I did a yum update and yum downgrade, now I have the reindex directory in the modules.

I have another problem, that it takes 2 hours to start after a restart ([Elasticsearch is taking 2 hours to resart](https://discuss.elastic.co/t/elasticsearch-is-taking-2-hours-to-resart/59286/7)), so I cannot check if it really works only in 2 hours..

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![veve90](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/veve90/32/6517_2.png) [@veve90](https://discuss.elastic.co/u/veve90)\
**Post date:** [September 5, 2016, 8:03am UTC](https://discuss.elastic.co/t/reindex-data/59671/10 "2016-09-05T08:03:09Z")

</div>

Hello, so now I have another error when I use the \_reindex API...

```
POST /_reindex
{
  "source": {
    "index": "existing_index"
  },
  "dest": {
    "index": "new_index",
    "version_type": "external",
    "op_type": "create"
  }
}

```

But I get an error

```auto
> {
> "index": "new_index",
> "type": "my_type",
> "id": "for each ID",
> "cause": {
> "type": "index_not_found_exception",
> "reason": "no such index",
> "index_uuid": "aifLzvTLTwmwSH2NbNWE4w",
> "index": "new_index"
> },
> "status": 404
> }

```

I tried to create the new\_index by myself before calling this API..bu no results..

Thank you!

---

<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:** [September 6, 2016, 1:44pm UTC](https://discuss.elastic.co/t/reindex-data/59671/11 "2016-09-06T13:44:34Z")

</div>

> [@veve90](#):
>
> I tried to create the new\_index by myself before calling this API..bu no results..

Do you happen to have [`action.auto_create_index`](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#index-creation) set to false? What do you mean by no response? What did you send to create the index?

---

<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, 10:22pm UTC](https://discuss.elastic.co/t/reindex-data/59671/12 "2017-07-05T22:22:18Z")

</div>


