Pipeline aggregations
The last type of aggregation we will discuss is pipeline aggregations. Till now we've learned about metrics aggregations and bucket aggregations. The first one returned metrics while the second type returned buckets. And both metrics and buckets aggregations worked on the basis of returned documents. Pipeline aggregations are different. They work on the output of the other aggregations and their metrics, allowing functionalities such as moving-average calculations (https://en.wikipedia.org/wiki/Moving_average).
Note
Remember that pipeline aggregations were introduced in Elasticsearch 2.0 and are considered experimental. This means that the API can change in the future, breaking backwards-compatibility.
Available types
There are two types of pipeline aggregation. The so called parent
aggregations family works on the output of other aggregations. They are able to produce new buckets or new aggregations to add to existing buckets. The second type is called
sibling aggregations...