-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Description
The change introduced by #31807 breaks visualizing rollup indices because the time filter is sent as a strict_date_optional_time without timezone instead of epoch_millis, which makes the specification of a timezone necessary.
The date format was switched in the first place to support dates before the unix epoch which isn't the case for epoch_millis in 7.0. If we find a date respresentation which supports dates before the epoch and doesn't require a timezone in rollup indices, we could use that one and get around trying to get the timezone into all of these places.
Edit: Unfortunately it also doesn't work with the epoch_millis format (see comment below) which means this isn't solvable by reverting #31807 - the timezone has to be propagated to all the filters when dealing with rollup indices.
Request generated:
[{
"index": "logstash_rollup",
"query": {
"size": 0,
"aggregations": {
"2": {
"date_histogram": {
"field": "@timestamp",
"interval": "2h",
"time_zone": "Europe/Berlin",
"min_doc_count": 1
},
"aggs": {
"1": {
"max": {
"field": "bytes"
}
}
}
}
},
"query": {
"bool": {
"must": [{
"range": {
"@timestamp": {
// At this point "time_zone": "Europe/Berlin", has to be specificed
"format": "strict_date_optional_time",
"gte": "2019-03-27T17:39:41.248Z",
"lte": "2019-03-27T17:54:41.248Z"
}
}
}],
"filter": [{
"match_all": {}
}, {
"match_all": {}
}],
"should": [],
"must_not": []
}
}
}
}]Exception shown:
{"statusCode":400,"error":"Bad Request","message":"[illegal_argument_exception] Field [@timestamp] in [range] query was found in rollup indices, but requested timezone is not compatible. Options include: [Europe/Berlin]","cause":["Field [@timestamp] in [range] query was found in rollup indices, but requested timezone is not compatible. Options include: [Europe/Berlin]"]}