Hi,
Previously on v5 when using the following query we would only be returned the buckets that are within the range specified. We need the min buckets to be able to graph correctly.
On v7.3 the same query returns a bucket for every day since 1/1/1970. I've struggled to work out how to disregard the buckets outside the range, or even why it is now doing this.
Any help/advice would be much appreciated as the docs aren't offering up any answers.
{
"query" : {
"bool" : {
"filter" : [
{
"range" : {
"StartField" : {
"gte" : 1567292400,
"lte" : 1569884399,
"format" : "epoch_second"
}
}
}
]
}
},
"size" : 0,
"aggs" : {
"accountTotals" : {
"terms" : {
"size" : 10,
"field" : "account"
},
"aggs" : {
"periods" : {
"date_histogram" : {
"field" : "StartField",
"interval" : "day",
"format" : "dd-MM-YYYY",
"min_doc_count": 0,
"extended_bounds" : {
"min" : "01-09-2019",
"max" : "30-09-2019"
}
},
"aggs" : {
"Totals" : {
"value_count" : {
"field" : "messageId"
}
}
}
}
}
}
}
}