The aggregations framework helps provide aggregated data based on a search query. It is based on simple building blocks called aggregations, that can be composed in order to build complex summaries of the data.

Check out how to handle aggregations with NEST and take a look at the Aggegrations available