# Need some examples for Aggregate filter Concept

**URL:** <https://discuss.elastic.co/t/need-some-examples-for-aggregate-filter-concept/179020>\
**Category:** Logstash\
**Created:** [April 30, 2019, 6:22am UTC](https://discuss.elastic.co/t/need-some-examples-for-aggregate-filter-concept/179020 "2019-04-30T06:22:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Smack\_Alpha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/smack_alpha/32/43660_2.png) [@Smack\_Alpha](https://discuss.elastic.co/u/Smack_Alpha)\
**Post date:** [April 30, 2019, 6:22am UTC](https://discuss.elastic.co/t/need-some-examples-for-aggregate-filter-concept/179020/1 "2019-04-30T06:22:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 28, 2019, 6:22am UTC](https://discuss.elastic.co/t/need-some-examples-for-aggregate-filter-concept/179020/2 "2019-05-28T06:22:56Z")

</div>

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