
Elasticsearch Server - Third Edition
By :

Elasticsearch 2.x allows us to use three types of aggregation: metrics, buckets, and pipeline. The metrics aggregations return a metric, just like the stats
aggregation we used for the stats
field. The bucket aggregations return buckets, the key and the number of documents sharing the same values, ranges, and so on, just like the terms
aggregation we used for the copies
field. Finally, the pipeline aggregations introduced in Elasticsearch 2.0 aggregate the output of the other aggregations and their metrics, which allows us to do even more sophisticated data analysis. Knowing all that, let's now look at all the aggregations we can use in Elasticsearch 2.x.
We will start with the metrics aggregations, which can aggregate values from documents into a single metric. This is always the case with metrics aggregations – you can expect them to be a single metric on the basis of the data. Let's now take a look at the metrics aggregations available in Elasticsearch...
Change the font size
Change margin width
Change background colour