i am trying to get docs matching query from elastic v1.5
{
"range": {
"create_time": {
"gte": "2020-07-20T00:00:00",
"lte": "2020-07-30T23:59:59",
"time_zone": "-2:00"
}
}
}
and aggregate result using date histogram by interval day
{
"posts_over_time": {
"date_histogram": {
"field": "create_time",
"interval": "day",
"min_doc_count": 0,
"time_zone": "-2:00",
"format": "yyyy-MM-dd",
"extended_bounds": {
"min": "2020-07-20",
"max": "2020-07-30"
}
},
"aggs": {
"Sum of engagements": {
"sum": {
"field": "interactions_count"
}
}
}
}
}
and buckets that returned have one more day '2020-07-19' before first date '2020-07-20' and this happened only when sending negative timezone, how can i return only days within range ?!