Hello everyone,
I have an elastic index with the mappings set to strict except for one field which is dynamic. I would also like to set the mapping of the dynamic field using dynamic templates
PUT trial
{
"mappings": {
"dynamic": "strict",
"properties": {
"field1": {
"type": "nested",
"properties": {
"display": {
"type": "keyword",
"index": "true"
}
}
},
"customFields": {
"dynamic": true,
"properties": {}
}
},
"dynamic_templates": [
{
"customFields": {
"match": "customFields",
"mapping": {
"type": "text",
"index": "true"
}
}
}
]
}
}
Once I try to index the data in this index, it looks like the dynamic template is not applied
"customFields": { -
"dynamic": "true",
"properties": { -
"countries": { -
"type": "text",
"fields": { -
"keyword": { -
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
I am missing something in here, but cannot find out what. Many thanks!