Query For Counting specific fields in ES

I want to count for eg city appearance in the index and return it back to java. How to do this ?
I have tried search Response but to no avail.

You need to provide more information, and show what you have tried

Never mind..I added a terms aggregations with set query method in SearchResponse and success.

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