Prior to Version 1.13.0, we were using the below template pattern and map it to the policy.
{
"order" : 1,
"version" : 60001,
"index_patterns" : ["test-*"],
"settings" : {
"opendistro.index_state_management.policy_id": "test-policy",
"index" : {
"number_of_shards" : "1",
"refresh_interval" : "30s"
}
},
"aliases" : {
"logs-cloud": {}
},
"mappings" : {
"_field_names": {
"enabled": false
},
"dynamic_templates" : [
{
"message_field" : {
"path_match" : "message",
"mapping" : {
"norms" : false,
"type" : "text"
},
"match_mapping_type" : "string"
}
},
{
"string_fields" : {
"mapping" : {
"norms" : false,
"type" : "text",
"fields" : {
"keyword" : {
"ignore_above" : 256,
"type" : "keyword"
}
}
},
"match_mapping_type" : "string",
"match" : "*"
}
}
],
"properties" : {
"@timestamp" : {
"type" : "date_nanos"
}
}
}
}
So now that the templates are part of policy itself and do not reference it the older way, it does not support all these above mentioned fields which it used to do earlier.
We are getting errors like
{“error”:{“root_cause”:[{“type”:“illegal_argument_exception”,“reason”:“Invalid field: [order] found in ISMTemplate.”}],“type”:“illegal_argument_exception”,“reason”:“Invalid field: [order] found in ISMTemplate.”},“status”:400}
{“error”:{“root_cause”:[{“type”:“illegal_argument_exception”,“reason”:“Invalid field: [mappings] found in ISMTemplate.”}],“type”:“illegal_argument_exception”,“reason”:“Invalid field: [mappings] found in ISMTemplate.”},“status”:400}