Need some examples for Aggregate filter Concept

I want to know the concept of aggregate filter. I read the guide of aggregate filter in elastic website.
I came to know that it merges the similar events with one.
For example:
if i have a data like this,
{ "country_name": "France", "town_name": "Paris" }
{ "country_name": "France", "town_name": "Marseille" }
{ "country_name": "USA", "town_name": "New-York" }
it will merge like this,
{ "country_name": "France", "towns": [ {"town_name": "Paris"}, {"town_name": "Marseille"} ] }
{ "country_name": "USA", "towns": [ {"town_name": "New-York"} ] }
by using the task_id

Is it correct or not ??
Give me some more examples

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.