Introduction
Filter aggregation helps you count or analyze only the data that matches certain rules. It lets you focus on a specific group inside your big data.
You want to count how many documents have a specific value in a field.
You need to find the average price of products only in a certain category.
You want to see how many users are from a particular country.
You want to analyze logs but only for errors with a certain status code.