Is it possible to get Count of distinct field value with groupby in ElasticSearch 1.2.1?

Hi all,

I have a set of data as follows:

Date | Unique Visitor Id | Country

13-Mar-2015 | abc | USA
13-Mar-2015 | xyz | India
13-Mar-2015 | xyz | India
14-Mar-2015 | pqr | Japan
14-Mar-2015 | xyz | USA

I want to fire a query similar to following:
Select count(distinct unique_visitor_id) from table group by Country where

Please let me know how I can do this in ES 1.2.1?


You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit