Skip to content

_rollup_search error when using 1w interval #34102

@jasondu168

Description

@jasondu168

Error on ES6.3.2 and ES6.4.0.
Got the error below when search by _rollup_search with both original index and rollup index.
Change to 1d, 1m,1s can get result.

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "failed to parse setting [date_histogram.interval] with value [1w] as a time value: unit is missing or unrecognized"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "failed to parse setting [date_histogram.interval] with value [1w] as a time value: unit is missing or unrecognized"
  },
  "status": 400
}

search:

 readings, rollup_readings_v1_weeks/_rollup_search
{
        "query": {
            "bool": {
                "filter": [{
                    "range": {
                        "created_at": {
                            "gte": 1535333348610,
                            "lte": 1538011748610
                        }
                    }
                }, {
                    "term": {
                        "device_id": "abcde"
                    }
                }, {
                    "term": {
                        "sensor_id": "fghij"
                    }
                }]
            }
        },
        "aggs": {
            "timeline": {
                "date_histogram": {
                    "field": "created_at",
                    "interval": "1w",
                    "time_zone": "UTC"
                },
                "aggs": {
                    "avg_value": {
                        "avg": {
                            "field": "value"
                        }
                    }
                }
            }
        },
        "size": 0
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions