Kibana dashboard vs discover (top 5 values)

When using the "discover" mode, I hover over a text field and I can easily see the top 5 values.

However when trying to create a dashboard showing exactly the same thing, I cannot find a way to do so since "a text field is not aggregatable"

Is this a Lens limitation or am I doing something wrong?

Thank you!

Hello,

So you cannot aggregate on a text field. You need to have the mapping set to keyword for you to be able to do that.

For the existing text field - if you want to make it make it aggregatable -
you have to do this:

Switching from a text field to a keyword field

If you previously used a text field to index unstructured machine-generated content, you can reindex to update the mapping to a keyword or wildcard field. We also recommend you update your application or workflow to replace any word-based full text queries on the field to equivalent term-level queries.

Here are our docs for keywords - Keyword type family | Elasticsearch Guide [8.4] | Elastic

Thanks,
Bhavya

1 Like

Thanks!

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