Search code examples
elasticsearchkibanakibana-5

What is the SQL “Distinct” equivalent in Kibana?


I’m new to Kibana and Elasticsearch. I have a field name called serviceprovidername. I would like to find how many distinct service provider name present in this field. How can I achieve this?

This is what I have tried so far.

search query

GET _search{“ages”: {“distinct_serviceprovidername”:{“terms”:{“field” :”serviceprovidername”}}}}

If my raw data is like this

 Serviceprovidername 
 _______________________
          X
          Y
          X
          Y
          Y
          Z

I’m excepting result as:

    Serviceprovidername 
    _______________________
             X
             Y
             Z

Solution

  • I didn’t find a “distinct “ kind of things in Kibana. However I’m able to plot this on x-y axis as suggested.Thanks for the help.