How to find distinct of 2 terms in ElasticSearch

I want to retrieve distinct value from document in elasticsearch on 2 terms...
for example: my documents has department and College...so if i am searching on any state name so i should get distinct values based on both of it across all the documents which has that state..
Result should look like as:
state:california
Result:::
department:CS
college:abc,
department:IT
college:abc,
department:CS
college:bcd,
department:CS
college:def,
department:EXTC
college:ABC

Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.