# ElasticSearch - significant term aggregation with range

**URL:** <https://discuss.elastic.co/t/elasticsearch-significant-term-aggregation-with-range/20453>\
**Category:** Elasticsearch\
**Created:** [October 28, 2014, 2:48am UTC](https://discuss.elastic.co/t/elasticsearch-significant-term-aggregation-with-range/20453 "2014-10-28T02:48:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CC1](https://avatars.discourse-cdn.com/v4/letter/c/9fc348/32.png) [@CC1](https://discuss.elastic.co/u/CC1)\
**Post date:** [October 28, 2014, 2:48am UTC](https://discuss.elastic.co/t/elasticsearch-significant-term-aggregation-with-range/20453/1 "2014-10-28T02:48:56Z")

</div>

I am interested to know how can I add a range for a significant terms  
aggregations query. For example:

{  
"query": {  
"terms": {  
"text\_content": [  
"searchTerm"  
]  
},  
"range": {  
"dateField": {  
"from": "date1",  
"to": "date2"  
}  
}  
},  
"aggregations": {  
"significantQTypes": {  
"significant\_terms": {  
"field": "field1",  
"size": 10  
}  
}  
},  
"size": 0  
}

will not work. Any suggestions on how to specify the range?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/50f0ba07-9f76-4472-9bbd-15d774cc63f4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/50f0ba07-9f76-4472-9bbd-15d774cc63f4%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:53am UTC](https://discuss.elastic.co/t/elasticsearch-significant-term-aggregation-with-range/20453/2 "2017-07-06T00:53:35Z")

</div>


