Is there a DateRangeField equivalent in ElasticSearch


(Rainer Simon) #1

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). 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


(system) #2