Indexing Date Ranges


(Rainer Simon) #1

I need to index objects that have a date range associated with them (date from/to), rather than just a single date. At query time, retrieving objects that intersect a certain interval is pretty straightforward. But what I can't work out is a way to generate date histograms for my data, along the lines of the standard date histogram aggregation that works on single date fields. Any thoughts?


(Colin Goodheart-Smithe) #2

Maybe the following topic would be useful to you? It uses a start date and a duration but the approach could easily be modified to use a start and end date instead.


(Rainer Simon) #3

Excellent - yes that looks exactly like what I was looking for (and will help me wrap my head around scripting too :slight_smile: )

Many thanks for the quick answer!


(system) #4