elastic search version: 6.2
I want the count data group by a particular field
example:
Assume I have 3 following docs
{ field1: "value1" } { field1: "value2" } { field1: "value2" }
I want the following result
value1: 1
value2: 2
Note: Field is of type text