From c0f524e1a3f49f5609dfc34730959ac57feeaa49 Mon Sep 17 00:00:00 2001 From: PSeitz Date: Fri, 18 Mar 2022 04:55:25 +0100 Subject: [PATCH] Update src/aggregation/bucket/histogram/histogram.rs Co-authored-by: Paul Masurel --- src/aggregation/bucket/histogram/histogram.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/aggregation/bucket/histogram/histogram.rs b/src/aggregation/bucket/histogram/histogram.rs index 47ce6b69b..4c049c68d 100644 --- a/src/aggregation/bucket/histogram/histogram.rs +++ b/src/aggregation/bucket/histogram/histogram.rs @@ -74,7 +74,9 @@ pub struct HistogramAggregation { /// The interval to chunk your data range. The buckets span ranges of [0..interval). /// Must be a positive value. pub interval: f64, - /// Intervals intersect at 0 by default, offset can move the interval. + /// Intervals implicitely defines an absolute grid of buckets `[interval * k, interval * (k + 1))`. + /// + /// Offset makes it possible to shift this grid into `[offset + interval * k, offset + interval * (k + 1)) /// Offset has to be in the range [0, interval). /// /// As an example. If there are two documents with value 8 and 12 and interval 10.0, they would