Group by Terms my_field.keyword

I can’t see field.keyword when I try to build Grafana chart with elasticsearch data source.
when I try to use Group by Terms field
Grafana says

Fielddata is disabled on text fields by default. Set fielddata=true on [user_name] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.

https://www.elastic.co/guide/en/elasticsearch/reference/current/fielddata.html
any one have idea how to use keyword with Group by and Terms if
I enter user_name.keyword like below I can’t see data on chart

On Kibana I can see “user_name.keyword” when I Group by and Terms,

Common problem when upgrading to Elasticsearch 5.x. Answered here:

So check your mapping to see if you have a keyword index mapping that you can use otherwise you will have to create it.

Hi ,

I’m using Elasticsearch 5.4 and Logstash 5.4 I can see user_name.keyword not analyzed in Index Patterns.

My question is
I can see it in Kibana but, I can’t see it Grafana.

Kibana

Grafana

After I enter user_name.keyword manualy
I can see data on my Graph

Thank you for support

1 Like