I have a document with few fields. For some of the fields in that document, my ES mappings defined those fields as "keyword".
I have indexed one document and tried to retrieve the index mappings to see how ES is storing the rest of the fields. I have seen, some of the other fields which I dint define as "keyword" are also marked as "keyword". I dont understand why.
Examples:
- Field marked as keyword by ES
"XXX": {
"type": "keyword"
}
- Field "YYY" marked as "text" and also mentioned type "keyword" in document as below. Why does ES stores this way for this field? What is the reason behind storing YYY as multi-field. How to avoid it from storing it as multi-field.
"YYY": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
I am looking forward to understand what are the reasons behind ES storing this way. Please help me understand.