After adding new mapping half way through re-indexing fails

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

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.

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

Response:

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

Welcome to our community! :smiley:

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.

Thank you Mark :slight_smile:

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

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