Skip to content

_rollup_search returns a 400 error when the body is empty-ish #32256

@cjcenizal

Description

@cjcenizal

CC @polyfractal @jen-huang

This request:

GET test_rollup_index/_rollup_search
{ "size": 0, "aggregations": {} }

Gets this response:

{
  "error": {
    "root_cause": [
      {
        "type": "action_request_validation_exception",
        "reason": "Validation Failed: 1: no requests added;"
      }
    ],
    "type": "action_request_validation_exception",
    "reason": "Validation Failed: 1: no requests added;"
  },
  "status": 400
}

Would it make sense to expect a similar response to this request? Just an idea. If not, then I think I'd prefer an empty result or barring that a helpful error.

GET test_rollup_index/_search
{ "size": 0, "aggregations": {} }

{
  "took": 0,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": 308,
    "max_score": 0,
    "hits": []
  }
}

Metadata

Metadata

Assignees

Labels

:StorageEngine/RollupTurn fine-grained time-based data into coarser-grained data>bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions