# Create new custom aggregator

**URL:** <https://discuss.elastic.co/t/create-new-custom-aggregator/231979>\
**Category:** Elasticsearch\
**Created:** [May 11, 2020, 10:25am UTC](https://discuss.elastic.co/t/create-new-custom-aggregator/231979 "2020-05-11T10:25:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Damiano](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@Damiano](https://discuss.elastic.co/u/Damiano)\
**Post date:** [May 11, 2020, 10:25am UTC](https://discuss.elastic.co/t/create-new-custom-aggregator/231979/1 "2020-05-11T10:25:42Z")

</div>

Hello,  
I need to create a custom metric aggregator that has its custom logic, like MAX, MIN, AVG etc.  
Is there an example to understand how to create it in Java?

Thank you!

---

<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:** [June 8, 2020, 10:25am UTC](https://discuss.elastic.co/t/create-new-custom-aggregator/231979/2 "2020-06-08T10:25:44Z")

</div>

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