Requested Backend changes, added details to popover description for the offset field

This commit is contained in:
Mattia Rossi
2018-11-26 08:58:25 -05:00
parent 9825484176
commit f6fc7f7b64
4 changed files with 10 additions and 2 deletions

View File

@@ -240,6 +240,7 @@ type DateHistogramAgg struct {
Missing *string `json:"missing,omitempty"`
ExtendedBounds *ExtendedBounds `json:"extended_bounds"`
Format string `json:"format"`
Offset string `json:"offset,omitempty"`
}
// FiltersAggregation represents a filters aggregation

View File

@@ -134,6 +134,9 @@ func addDateHistogramAgg(aggBuilder es.AggBuilder, bucketAgg *BucketAgg, timeFro
a.Interval = "$__interval"
}
if bucketAgg.Settings.Get("offset").MustString("") != "" {
a.Offset = bucketAgg.Settings.Get("offset").MustString("")
}
if missing, err := bucketAgg.Settings.Get("missing").String(); err == nil {
a.Missing = &missing
}