Closed
Description
This originated from https://discuss.elastic.co/t/visualizing-rollup-index-with-timezone-result-in-error/159064/2. CC @polyfractal
To reproduce, follow these steps to create data, a rollup job, and a search on the rolled-up data:
PUT test_index
PUT test_index/_doc/1
{
"utc_time" : "2018-12-02T16:02:19.851Z"
}
PUT _xpack/rollup/job/test_job
{
"index_pattern": "test_index",
"rollup_index": "test_index_rollup",
"cron": "0 * * * * ?",
"groups": {
"date_histogram": {
"interval": "24h",
"field": "utc_time",
"time_zone": "Canada/Mountain"
}
},
"metrics": [],
"page_size": 1000
}
POST _xpack/rollup/job/test_job/_start
GET test_index_rollup/_rollup_search
{
"size":0,
"aggregations":{
"2":{
"date_histogram":{
"field":"order_date",
"interval":"24h",
"time_zone":"Canada/Mountain",
"min_doc_count":1
}
}
}
}
The search will fail with this error:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "There is not a rollup job that has a [date_histogram] agg on field [order_date] which also satisfies all requirements of query."
}
],
"type": "illegal_argument_exception",
"reason": "There is not a rollup job that has a [date_histogram] agg on field [order_date] which also satisfies all requirements of query."
},
"status": 400
}