# After adding new mapping half way through re-indexing fails

**URL:** <https://discuss.elastic.co/t/after-adding-new-mapping-half-way-through-re-indexing-fails/255951>\
**Category:** Elasticsearch\
**Created:** [November 19, 2020, 9:10am UTC](https://discuss.elastic.co/t/after-adding-new-mapping-half-way-through-re-indexing-fails/255951 "2020-11-19T09:10:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NutaN\_Shrivastava](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nutan_shrivastava/32/79293_2.png) [@NutaN\_Shrivastava](https://discuss.elastic.co/u/NutaN_Shrivastava)\
**Post date:** [November 19, 2020, 9:10am UTC](https://discuss.elastic.co/t/after-adding-new-mapping-half-way-through-re-indexing-fails/255951/1 "2020-11-19T09:10:09Z")

</div>

I used the below code to add new mapping to a new index

```auto
PUT _index_template/engage-logs
    {
      "index_patterns": [
        "engage-log-reindexed-*"
      ],
      "template": {
      "mappings": {
        "dynamic_templates": [
          {
            "strings": {
              "match_mapping_type": "string",
              "mapping": {
                "type": "keyword"
              }
            }
          }
        ],
        "properties": {
          "message" : {
            "type" : "text"      
          }
        }
            
      }
      }
    }

```

When I try to reindex the data of my original index to the new index, I get parse exception. Under Index management I do see the new index created and slowly after some time shows all the documents were added to it. But why do I get the exception am unable to understand, its difficult to find out if any data loss was there.

```auto
POST _reindex?slices=5&refresh
{
  "source": {
    "index": "engage-log-2020.11.18"
  },
  "dest": {
    "index": "engage-log-reindexed-2020.11.18"
  }
}

```

Response:

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "parse_exception",
        "reason" : "request body is required"
      }
    ],
    "type" : "parse_exception",
    "reason" : "request body is required"
  },
  "status" : 400
}

```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 19, 2020, 9:11am UTC](https://discuss.elastic.co/t/after-adding-new-mapping-half-way-through-re-indexing-fails/255951/2 "2020-11-19T09:11:28Z")

</div>

Welcome to our community! 😃

It'd be helpful if you could post the entire exception you are seeing. Please also check your Elasticsearch logs for anything else at that time that might seem related.

---

<div class="post-metadata">

**Author:** ![NutaN\_Shrivastava](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nutan_shrivastava/32/79293_2.png) [@NutaN\_Shrivastava](https://discuss.elastic.co/u/NutaN_Shrivastava)\
**Post date:** [November 19, 2020, 9:17am UTC](https://discuss.elastic.co/t/after-adding-new-mapping-half-way-through-re-indexing-fails/255951/3 "2020-11-19T09:17:50Z")

</div>

Thank you Mark 🙂

I have added the response in the question itself. I don't see any logs generated for this on the master node.

---

<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:** [December 17, 2020, 9:17am UTC](https://discuss.elastic.co/t/after-adding-new-mapping-half-way-through-re-indexing-fails/255951/4 "2020-12-17T09:17:57Z")

</div>

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