# Date range aggregation min\_doc\_count

**URL:** <https://discuss.elastic.co/t/date-range-aggregation-min-doc-count/36448>\
**Category:** Elasticsearch\
**Created:** [December 5, 2015, 3:29pm UTC](https://discuss.elastic.co/t/date-range-aggregation-min-doc-count/36448 "2015-12-05T15:29:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MiguelGM](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miguelgm/32/5327_2.png) [@MiguelGM](https://discuss.elastic.co/u/MiguelGM)\
**Post date:** [December 5, 2015, 3:29pm UTC](https://discuss.elastic.co/t/date-range-aggregation-min-doc-count/36448/1 "2015-12-05T15:29:59Z")

</div>

It would be great to have min\_doc\_count to date\_range aggregations.

"aggs": {  
"age\_range": {  
"date\_range": {  
"field": "birthdate",  
"ranges": [  
{ "from": "now-14y/d", "to": "now/d", "key": "0-14" },  
{ "from": "now-18y/d", "to": "now-14y/d", "key": "14-18" },  
{ "from": "now-25y/d", "to": "now-18y/d", "key": "18-25" },  
{ "from": "now-35y/d", "to": "now-25y/d", "key": "25-35" },  
{ "from": "now-45y/d", "to": "now-35y/d", "key": "35-45" },  
{ "from": "now-55y/d", "to": "now-45y/d", "key": "45-55" },  
{ "to": "now-55y/d", "key": "55-99" }  
] },  
"aggs": {  
"gender": {  
"terms": {  
"field": "gender"  
} } } } }

Is there any plan to add this?

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:** [July 5, 2017, 11:33pm UTC](https://discuss.elastic.co/t/date-range-aggregation-min-doc-count/36448/2 "2017-07-05T23:33:22Z")

</div>


