I created index template in ES 6.7 and got error .
{
"mappings" : {
"date_detection": false,
"dynamic_templates": [
{
"labels": {
"mapping": {
"type": "keyword"
},
"match_mapping_type": "string",
"path_match": "labels.*"
}
},
{
"fields": {
"mapping": {
"type": "keyword"
},
"match_mapping_type": "string",
"path_match": "fields.*"
}
},
{
"data.nonTerminatingMatchingRules": {
"mapping": {
"type": "keyword"
},
"match_mapping_type": "string",
"path_match": "data.nonTerminatingMatchingRules.*"
}
}
],
"properties": {
"@timestamp": {
"type": "date"
},
"data" : {
"properties" : {
"nonTerminatingMatchingRules" : {
"properties" : {
"action" : {
"ignore_above" : 1024,
"type" : "keyword"
},
"ruleId" : {
"ignore_above" : 1024,
"type" : "keyword"
}
}
}
}
}
}
}
"settings": {
"index.refresh_interval": "5s",
"number_of_shards" : "1"
},
"index_patterns": ["cwl--aws-lambda*"],
"template": "cwl--aws-lambda*"
}
And error
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Malformed [mappings] section for type [dynamic_templates], should include an inner object describing the mapping"
}
],
"type": "illegal_argument_exception",
"reason": "Malformed [mappings] section for type [dynamic_templates], should include an inner object describing the mapping"
},
"status": 400
}