When adding a filter in kibana all string fields have a entry and .keyword entry

When adding a filter in kibana all string fields have an entry and .keyword entry. please assist how to remove the keyword

image

I guess you are using dynamic mapping while indexing the data into Elasticsearch.

The crucial difference between them is that Elasticsearch will analyze the Textbefore it’s stored into the Inverted Index while it won’t analyzeKeyword type.

Hence, that creates keyword fields along with Text fields.

When you set "dynamic":"true", Elasticsearch will map string fields as atextfield with akeywordsubfield. If you are only indexing structured content and not interested in full text search, you can make Elasticsearch map your fields only askeyword fields. However, you must search on the exact same value that was indexed to search those fields.

Hence, you need to explicitly map all your fields to the respective datatype which is required and that will solve your issue.

You can use the below URL to try explicit mapping.

https://www.elastic.co/guide/en/elasticsearch/reference/current/explicit-mapping.html

By default Elasticsearch maps text fields to text and keyword fields, so by specifying a text-only mapping without keyword would stop it being available. But this would impact your ability to perform aggregations against these fields.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.