One of our use cases is to get all the distinct values of a particular field. For e. g. if we are querying against Oracle database we can execute below query :
select distinct column_name from table_name
The above query gives us all the distinct values of column 'column_name' from the table 'table_name'.
We need something similar in Elastic Search. Please provide inputs on how this can be achieved in Elastic Search Java API.