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
}