Approx top count in ElasticSearch

I am using BigQuery to get the top ten values for a query with this syntax:

    APPROX_TOP_COUNT(first_name, 10),
    APPROX_TOP_COUNT(last_name, 10)
    <my query>

The result allows me to make something like:

- John (40)
- Don (12)
- Sarah (3)

- Smith (50)
- Jones (5)

Is there a way to do the same in ElasticSearch? Or do I have to do a new query to get each top-n filters. This becomes quite cumbersome and resource-intensive if, for example, we have 20 filters that we need to build.

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