elasticsearchkibanaelasticsearch-indices

Does updating Elasticsearch indices requires updating Kibana index pattern?


I am using Elasticsearch and Kibana as plugin to view the data in the indices. I am using Kibana's DevTools to send commands for adding/deleting/updating indices etc.

I want to add a field to a certain text property so it will have a keyword field to be able to both make a full text searches and aggregate using this property.

1) Does a change like that means I need to update Kibana's index pattern as well?

2) I have read the ElasticSearch's docs on PUT Mappings and know how to use it to update the indices themselves, but I don't know how to update the index patterns.. I read the same API should be used to update it, but I don't know how to see the index pattern's original mapping in order to update it.


Solution

    1. Yes, if you change the index mapping in ES, then you need to go in Kibana and refresh the related index patterns.

    2. Right now, you need to go inside Kibana (Management > Index patterns), select the index pattern, and press the "Refresh" button at the top right of the window in order to pick up the mapping changes.

    Also note that if you updated some text fields in order to have a keyword sub-field, you'll also need to call the _update_by_query API on your index in order to reindex the changed field in all your documents