@coolshiva123 i want the count of that string, suppose there are 25 blue and 15 red. as a string in a color field. I want that count to reflect in the pie chart
As far as I know grafana, count function can only count the documents (with valid index and type + id)… counting fields with in an index may be difficult …
just add a terms group by on the color field
no not really, is it a ES query option?
No, I mean I am not able to write a Lucene query for counting the number of particular colors for the above elasticsearch data. I get an error when I select “term” with “jobs.color”.
Error: Fielddata is disabled on text fields by default. Set fielddata=true on [jobs.color] 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.
You have all the info you need in the elasticsearch error, use a keyword field, to do this you need to update the index mapping and restore the data