0PricingLogin
Elasticsearch & Full Text Search Systems · Lesson

Bucket Aggregations

Group your documents into 'buckets' based on fields like terms, ranges, or dates, enabling faceted search and data categorization.

Grouping Your Data with Buckets

Welcome to Bucket Aggregations! In Elasticsearch, aggregations allow you to analyze your data.

Bucket aggregations specifically group documents into sets, or 'buckets', based on field values. Think of it like the GROUP BY clause in SQL.

  • Categorize data: Group products by brand.
  • Faceted search: Show counts for different filters.
  • Analyze trends: See activity per day or month.

Finding Unique Values with Terms

The terms aggregation is one of the most common bucket aggregations. It finds the top unique values for a specific field and then counts how many documents fall into each unique value's bucket.

It's incredibly useful for seeing the distribution of categorical data, like product categories, user roles, or country names.

All lessons in this course

  1. Metric Aggregations
  2. Bucket Aggregations
  3. Pipeline Aggregations
  4. Nested and Sub-Aggregations
← Back to Elasticsearch & Full Text Search Systems