I tried to customize the dynamic_date_formats as part of Index template in ElasticSearch version 6.7.2. But I am facing issues:-
PUT _template/template_1
{
"index_patterns":"*",
"version": 1,
"mappings": {
"dynamic_date_formats": ["yyyy/MM/dd HH:mm:ss Z||yyyy/MM/dd Z||dd/MM/yyyy||yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM-dd'T'HH:mm:ss||yyyy-MM-ddTHH:mm:ss"]
},
"settings": {
"number_of_shards": 5,
"mapping.ignore_malformed": true
}
}
Error:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Malformed [mappings] section for type [dynamic_date_formats], should include an inner object describing the mapping"
}
],
"type": "illegal_argument_exception",
"reason": "Malformed [mappings] section for type [dynamic_date_formats], should include an inner object describing the mapping"
},
"status": 400
}