I create my indices with a nice tidy mapping where most fields are keywords but, over time, the mapping mutates into a monster of text fields with a ".keyword" property. How can this happen and is there any way to stop it.
I start with:
{
"logs-prod3": {
"mappings": {
"properties": {
"category": {"type": "keyword"},
"contact": {"type": "keyword"},
...
Then I re-index my data to that index and it mutates into:
{
"logs-prod3": {
"mappings": {
"properties": {
"category": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"contact": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
...
Why is this happening?
How can I enforce a mapping - preferably reject any data not defined by the mapping!