# Aggregating on minimum value field

**URL:** <https://discuss.elastic.co/t/aggregating-on-minimum-value-field/21575>\
**Category:** Elasticsearch\
**Created:** [January 11, 2015, 10:44pm UTC](https://discuss.elastic.co/t/aggregating-on-minimum-value-field/21575 "2015-01-11T22:44:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![orenor](https://avatars.discourse-cdn.com/v4/letter/o/e95f7d/32.png) [@orenor](https://discuss.elastic.co/u/orenor)\
**Post date:** [January 11, 2015, 10:44pm UTC](https://discuss.elastic.co/t/aggregating-on-minimum-value-field/21575/1 "2015-01-11T22:44:54Z")

</div>

Hello,  
I'm looking for a way to run terms aggregation on term fields having a count of at least x.  
Note that I'm not trying to exclude terms that had below minimum amounts of hits(min\_doc\_count), but I'm trying to Aggregate only values that are bigger then x.

Is this kind of thing possible? Perhaps using a script?

Thanks,  
Oren

---

<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:** [July 6, 2017, 12:39am UTC](https://discuss.elastic.co/t/aggregating-on-minimum-value-field/21575/2 "2017-07-06T00:39:40Z")

</div>


