# Logstash elastic search filter plugin

**URL:** <https://discuss.elastic.co/t/logstash-elastic-search-filter-plugin/177457>\
**Category:** Logstash\
**Created:** [April 18, 2019, 12:03pm UTC](https://discuss.elastic.co/t/logstash-elastic-search-filter-plugin/177457 "2019-04-18T12:03:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gomathi\_Meena](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gomathi_meena/32/43086_2.png) [@Gomathi\_Meena](https://discuss.elastic.co/u/Gomathi_Meena)\
**Post date:** [April 18, 2019, 12:03pm UTC](https://discuss.elastic.co/t/logstash-elastic-search-filter-plugin/177457/1 "2019-04-18T12:03:32Z")

</div>

Hi , I'm quite new to ELK stack . What is the purpose of options like aggregation\_fields,sort and enable\_sort in elasticsearch filter plugin ? how do they work ? and i have even tried with the following configuration ,that doesn't work for me ..  
Here the configuration for filter plugin :  
**aggregation\_field :**  
filter {  
elasticsearch {  
hosts =\> ["localhost"]  
index =\> "test1"  
query =\> "priority:M"  
result\_size =\> 8  
aggregation\_fields =\> {  
"country" =\> "test"  
}  
}  
}  
**sort : sort works only for timestamp field. why?**  
filter {  
elasticsearch {  
hosts =\> ["localhost"]  
index =\> "test1"  
query =\> "priority:M"  
result\_size =\> 8  
sort =\> "country:desc"  
}  
}  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![nandha\_88](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nandha\_88](https://discuss.elastic.co/u/nandha_88)\
**Post date:** [April 18, 2019, 1:55pm UTC](https://discuss.elastic.co/t/logstash-elastic-search-filter-plugin/177457/2 "2019-04-18T13:55:46Z")

</div>

Hi,

Aggreation =\> work to add two or more values  
Sort =\> To sort the value based Time , Minimum value , maximum value.

Share your setup and what is the purpose or your plan on ELK stack.

---

<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 16, 2019, 1:55pm UTC](https://discuss.elastic.co/t/logstash-elastic-search-filter-plugin/177457/3 "2019-05-16T13:55:50Z")

</div>

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