date_histogram
The function date_histogram(str agg_name, str fieldname, str time_interval) a
lows to create histograms by date of the aggregation results.
The aggregation result will be stored under the key agg_name in results
. However, results will be segmented as a histogram with resolution according to time_interval
. The available units for time_interval
are s/m/h/d.
Example:
In this example, the aggregation results will be binned into a histogram where the width of each bin is 1d.
Last updated