# Reindexing Api is not copying the data

**URL:** https://discuss.elastic.co/t/reindexing-api-is-not-copying-the-data/285454
**Category:** Elasticsearch
**Tags:** reindex
**Created:** [September 29, 2021, 9:12am UTC](https://discuss.elastic.co/t/reindexing-api-is-not-copying-the-data/285454 "2021-09-29T09:12:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)
#### Post date: [September 29, 2021, 9:12am UTC](https://discuss.elastic.co/t/reindexing-api-is-not-copying-the-data/285454/1 "2021-09-29T09:12:05Z")

</div>

Using multi-node Elasticsearch version 7.14  
I am facing an issue while doing reindexing.I want reindex all the indices given below

```auto
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open log-wlb-sysmon-2021.09.29-000014 gh4KHV6xRgSbk33Yk2cxJw 1 0 0 0 208b 208b
green open log-wlb-sysmon-2021.08.16-000015 EtF6odgpQGGRjQ0Nywqtxg 1 1 102154111 0 102.2gb 51.1gb
green open log-wlb-sysmon-2021.09.23-000019 tevWknvdRY-XwrEARoNY9g 1 1 32029659 89209 38.6gb 19.3gb
green open log-wlb-sysmon-2021.07.28-000013 6as7-RLlQpest5UkDIp5Rg 1 1 85912426 23421 100gb 50gb
green open log-wlb-sysmon-2021.08.27-000017 hAGeCkqhRlCBvmwBLonjaQ 1 1 93303600 0 102gb 51gb
green open log-wlb-sysmon-2021.08.19-000016 mkBAnhNMReyHzw0PJwkCHg 1 1 83527835 0 102gb 51gb
green open log-wlb-sysmon-2021.08.08-000014 ZxTk_TVRQiezNiggSQBejg 1 1 87312747 0 101.7gb 50.8gb
green open log-wlb-sysmon-2021.09.07-000018 HuDxDct7RGKOcuYFXCKA8w 1 1 92614553 0 101.6gb 50.8gb

```

**How i done this is given below**

**1.**

```auto
PUT %3Clog-wlb-sysmon-%7Bnow%2Fd%7D-000014%3E 
{
"aliases": {
   "log-wlb-sysmon": {
      "is_write_index": false      
   }
 },
 "settings": {
   "index.lifecycle.parse_origination_date":true
   , "refresh_interval": "-1"
   , "number_of_replicas": 0
 }
}

```

**2.**

```auto
POST _aliases
{
  "actions": [
    {
      "add": {
        "index": "log-wlb-sysmon-2021.09.23-000019",
        "alias": "log-wlb-sysmon",
        "is_write_index": false
      }
    }, {
      "add": {
        "index": "log-wlb-sysmon-2021.09.29-000014",
        "alias": "log-wlb-sysmon",
        "is_write_index": true
      }
    }
  ]
}

```

**3.**

```auto
POST _reindex?max_docs=87312747&wait_for_completion=false
{
  "conflicts": "proceed"
  , "source": {
    "index": "log-wlb-sysmon-2021.08.08-000014"
    , "size": 5000
    
  }
  , "dest": {
    "index": "log-wlb-sysmon-2021.09.29-000014"
  }
}

```

I dont know why it is copying.The index size is 100gb.  
i get the task id... but it's not shown in `GET /_task` API

---

<div class="post-metadata">

### Author: ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)
#### Post date: [September 30, 2021, 9:39am UTC](https://discuss.elastic.co/t/reindexing-api-is-not-copying-the-data/285454/2 "2021-09-30T09:39:50Z")

</div>

Problem solved.Issue was in mapping

---

<div class="post-metadata">

### Author: ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)
#### Post date: [September 30, 2021, 9:42am UTC](https://discuss.elastic.co/t/reindexing-api-is-not-copying-the-data/285454/3 "2021-09-30T09:42:19Z")

</div>

To know the reason why it stopped.Run the following query  
`GET /_tasks/task_id`  
The task\_id is the id which we got in

> [@Aniket\_Pant](#):
>
> `POST _reindex?max_docs=87312747&wait_for_completion=false`

---

<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: [October 28, 2021, 9:42am UTC](https://discuss.elastic.co/t/reindexing-api-is-not-copying-the-data/285454/4 "2021-10-28T09:42:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
