# Is there a DateRangeField equivalent in ElasticSearch

**URL:** https://discuss.elastic.co/t/is-there-a-daterangefield-equivalent-in-elasticsearch/34804
**Category:** Elasticsearch
**Created:** [November 17, 2015, 1:19pm UTC](https://discuss.elastic.co/t/is-there-a-daterangefield-equivalent-in-elasticsearch/34804 "2015-11-17T13:19:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rsimon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rsimon/32/5977_2.png) [@rsimon](https://discuss.elastic.co/u/rsimon)
#### Post date: [November 17, 2015, 1:19pm UTC](https://discuss.elastic.co/t/is-there-a-daterangefield-equivalent-in-elasticsearch/34804/1 "2015-11-17T13:19:29Z")

</div>

I'm working with documents that have (multiple) date ranges associated. I.e. there's not just a single timestamp per document, but one or more "start"/"end" timestamp pairs. I need to build time histograms in the UI (no. of documents in a given bucket, between minimum and maximum timestamp appearing in the search results).

Lucene 5 introduced a neat mechanism for building time histograms using spatial indexing and 2D faceting underneath the hood (cf. [https://wiki.apache.org/solr/SpatialForTimeDurations](https://wiki.apache.org/solr/SpatialForTimeDurations)). The same mechanism is also available in SOLR as a "DateRangeField" data type.

Is there something equivalent in ElasticSearch 2? (Or is it planned?) Otherwise: do you have any thoughts on how I might go about implementing this, e.g. by repurposing a geo\_point datatype somehow?

Thanks in advance,  
Rainer

---

<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:37pm UTC](https://discuss.elastic.co/t/is-there-a-daterangefield-equivalent-in-elasticsearch/34804/2 "2017-07-05T23:37:58Z")

</div>


