Is there a way of rewriting this query so it works on a _rollup_search? It works on the raw index, but I get this error on the rollup index.
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Unable to translate aggregation tree into Rollup. Aggregation [my_date_range] is of type [RangeAggregationBuilder] which is currently unsupported."
}
],
"type": "illegal_argument_exception",
"reason": "Unable to translate aggregation tree into Rollup. Aggregation [my_date_range] is of type [RangeAggregationBuilder] which is currently unsupported."
},
"status": 400
}
Here's the query:
{
"size": 0,
"query": {
"match_all": {}
},
"aggs": {
"my_date_range": {
"range": {
"field": "@timestamp",
"format": "YYYY-MM-DD",
"ranges": [
{
"from": "2017-09-01"
},
{
"to": "2017-09-30"
}
]
},
"aggs": {
"total_bytes": {
"sum": {
"field": "bytes"
}
}
}
}
}
}