Hi there,
I been trying to run the following query on a rollup index, but cant get around the interval error.
This is my query:
GET /rollup-24hours/_search
{
"size": 0,
"aggs": {
"by_period": {
"aggs": {
"sum_value": {
"sum": {
"field": "value"
}
}
},
"date_histogram": {
"field": "timestamp",
"interval": "hour",
"order": {
"_key": "desc"
}
}
}
}
}
And the error:
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "Invalid interval specified, must be non-null and non-empty"
}
],
"type" : "search_phase_execution_exception",
"reason" : "all shards failed",
"phase" : "query",
"grouped" : true,
"failed_shards" : [
{
"shard" : 0,
"index" : "rollup-24hours",
"node" : "Q7Xq38SpSlaQssaeg7zUNT39w",
"reason" : {
"type" : "illegal_argument_exception",
"reason" : "Invalid interval specified, must be non-null and non-empty"
}
}
],
"caused_by" : {
"type" : "illegal_argument_exception",
"reason" : "Invalid interval specified, must be non-null and non-empty",
"caused_by" : {
"type" : "illegal_argument_exception",
"reason" : "Invalid interval specified, must be non-null and non-empty"
}
}
},
"status" : 400
}
The rollup looks like this:
{
"_id": "rollup-24hours",
"_seqNo": 22584,
"_primaryTerm": 2,
"rollup": {
"rollup_id": "rollup-24hours",
"enabled": true,
"schedule": {
"interval": {
"start_time": 1631259744458,
"period": 1,
"unit": "Minutes"
}
},
"last_updated_time": 1631259744458,
"enabled_time": 1631259744458,
"description": "Roll up for 24 hours",
"schema_version": 9,
"source_index": "documents-*",
"target_index": "rollup-24hours",
"metadata_id": "JdCpenzBJrVouQoQQ--r",
"roles": [],
"page_size": 1000,
"delay": 0,
"continuous": true,
"dimensions": [
{
"date_histogram": {
"fixed_interval": "24h",
"source_field": "timestamp",
"target_field": "timestamp",
"timezone": "UTC"
}
},
{
"terms": {
"source_field": "company.keyword",
"target_field": "company.keyword"
}
},
{
"terms": {
"source_field": "user.keyword",
"target_field": "user.keyword"
}
},
{
"terms": {
"source_field": "key.keyword",
"target_field": "key.keyword"
}
},
{
"terms": {
"source_field": "product.keyword",
"target_field": "product.keyword"
}
},
{
"terms": {
"source_field": "value",
"target_field": "value"
}
}
],
"metrics": [
{
"source_field": "value",
"metrics": [
{
"sum": {}
}
]
}
]
},
"metadata": {
"rollup-24hours": {
"metadata_id": "JdCpznsBJrVouQoQQ--r",
"rollup_metadata": {
"rollup_id": "rollup-24hours",
"last_updated_time": 1631259807589,
"continuous": {
"next_window_start_time": 1631232000000,
"next_window_end_time": 1631318400000
},
"status": "started",
"failure_reason": null,
"stats": {
"pages_processed": 44,
"documents_processed": 871,
"rollups_indexed": 293,
"index_time_in_millis": 497,
"search_time_in_millis": 1404
}
}
}
}
}
Any ideas what wrong here?
Elasticsearch version 7.10.2