Aggregations: Count, Group, Average

6 min
Audience
you can filter with bool, term, and range (lessons 01 and 02)
Duration
30 min
Module
3/7
Target skill
answer numerical questions (how many, by what, on average, which percentile) with the terms, avg, stats, histogram, date_histogram, cardinality, range, filter, top_hits, and percentiles aggregations.

In One Picture

Until now you asked Elasticsearch "give me the documents that…". Aggregations change the question: "how many courses per category? what average price? how many accesses per day? what latency for 99% of requests?". It is SQL's GROUP BY, but more flexible: you can nest groups (category → level), place a metric in each group (average price per category), and even bring back the best documents of each group. All in the same _search request, alongside a classic search or in its place. This is what Kibana does under the hood for every chart you will see in module 4.

Preview — the rest of the lesson is for enrolled readers.

Already enrolled with a code?

Your access is tied to your account, not to this link. Sign in with the same email you used in class: your course is waiting, no need to enter the code again.

Sign inNo account yet? Create one
This lesson is part of the “Search Like a Pro with Query DSL” module

The first modules of the course are open to everyone. For the rest you have three options: buy this course once and for all, subscribe, or enter the code handed out in class.

Are you a student on this course?

The code is tied to your account: sign in or create an account and it will be applied automatically when you come back.

No account yet? Create one