I'm constructing a dynamic template that removes the keyword mapping for values in Elasticsearch 7.0.0.
My template:
mappings": {
"dynamic_templates": [
{
"string_to_text": {
"mapping": {
"type": "text"
},
"match_mapping_type": "string"
}
}
]
}
The data I push:
PUT /test/_doc/1
{
"Program": "aprogram"
}
The result:
"mappings" : {
"properties" : {
"Program" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
}
I would expect the Program field to be text only but it seems it also gets the keyword type.
When I test this on our production cluster on version 6.7.0, I get the expected result: the program field is text only.