Hi,
I am using Elasticsearch 6.5 . I have an existing index with a mapping. I want to add a field to this mapping called documentYear
which is of type keyword
. This field is not relevant for full-text search so I want it created only as a keyword field. I add this to the mapping:
"documentYear": {
"type": "keyword"
},
Then I re-index my data. As the field is getting populated it turns out it's created like this:
"documentYear": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
How can I avoid that happening? I used to use index.mapper.dynamic = false
to avoid this, but it has been deprecated. How can I ensure my field gets created as keyword only?