Module aggregations

Source
Expand description

An aggregation summarizes your data as metrics, statistics, or other analytics.

Aggregations help you answer questions like:

  1. What’s the average load time for my website?
  2. Who are my most valuable customers based on transaction volume?
  3. What would be considered a large file on my network?
  4. How many products are in each product category?

Elasticsearch organizes aggregations into three categories:

  • Metrics aggregations that calculate metrics, such as a sum or average, from field values.
  • Bucket aggregations that group documents into buckets, also called bins, based on field values, ranges, or other criteria.
  • Pipeline aggregations that take input from other aggregations instead of documents or fields.

Re-exports§

pub use self::bucket::*;
pub use self::metrics::*;
pub use self::params::*;
pub use self::pipeline::*;

Modules§

bucket
Bucket aggregations don’t calculate metrics over fields like the metrics aggregations do, but instead, they create buckets of documents. Each bucket is associated with a criterion (depending on the aggregation type) which determines whether or not a document in the current context “falls” into it. In other words, the buckets effectively define document sets. In addition to the buckets themselves, the bucket aggregations also compute and return the number of documents that “fell into” each bucket.
metrics
The aggregations in this family compute metrics based on values extracted in one way or another from the documents that are being aggregated. The values are typically extracted from the fields of the document (using the field data), but can also be generated using scripts.
params
Value types accepted by aggregation clauses
pipeline
Pipeline aggregations work on the outputs produced from other aggregations rather than from document sets, adding information to the output tree. There are many different types of pipeline aggregation, each computing different information from other aggregations, but these types can be broken down into two families:

Enums§

Aggregation
A container enum for supported Elasticsearch query types

Type Aliases§

Aggregations
Type alias for a collection of aggregations