I am trying ot have dynamic mapping for these objects:
{
participant_1{
"role" : "role1"
},
participant_2{
"role" : "role2"
}.
participant_3{
"role" : "role3"
}
}
My mapping looks like that:
"mappings": {
"dynamic_templates": [
{
"role_test": {
"match": "participant_*.role",
"match_pattern": "regex",
"mapping": {
"type": "keyword"
}
}
}
]
I expect the role field to be mapped as "keyword"
but it is actually mapped as text:
"role": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
what am I missing?