Skip to content

Ingest simulate should coerce _id to a string #23823

Closed
@clintongormley

Description

@clintongormley

Passing an unquoted _id to simulate:

POST _ingest/pipeline/_simulate
{
  "pipeline": {
    "processors": [
      {
        "set": {
          "field": "foo",
          "value": "bar"
        }
      }
    ]
  },
  "docs": [
    {
      "_index": "t",
      "_type": "t",
      "_id": 1,
      "_source": {
        "foo": 1
      }
    }
  ]
}

throws the following exception:

      {
        "type": "parse_exception",
        "reason": "[_id] property isn't a string, but of type [java.lang.Integer]",
        "header": {
          "property_name": "_id"
        }
      }

The _id should be coerced to a string. In fact, so should _index, _type, _routing, _parent...

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