Getting insights from data using aggregations
When looking to understand insights in your data, retrieving documents that fit the question you're looking to answer is just the first part of the problem. For example, if an analyst is looking to understand how much traffic their web servers served in a given day, running a query to retrieve logs in the given period may still return millions of events.
Aggregations allow you to summarize large volumes of data into something easier to consume. Elasticsearch can perform two primary types of aggregations:
- Metric aggregations can calculate metrics such as count, sum, min, max, and average on numeric data.
- Bucket aggregations can be used to organize large datasets into groups, depending on the value of a field. Buckets can be created based on a range, date, the frequency of a term in the search results (or corpus), and so on.
An exhaustive list of all supported aggregations can be found in the Elasticsearch guide...