Skip to content

ignore_missing takes no effect when use template snippets in Rename Ingest Processor #74241

@gaobinlong

Description

@gaobinlong
Contributor

Elasticsearch version: master

Plugins installed: []

JVM version (java -version): 14.0.1

OS version (uname -a if on a Unix-like system): Mac OS 10.13.6

Description of the problem including expected versus actual behavior:

When use template snippets in the field parameter of the rename ingest processor, and set ignore_missing to true, if the resolved field of the template snippets does not exist, the processor doesn't exit quietly but throw an exception.

Steps to reproduce:

POST _ingest/pipeline/_simulate

{
  "pipeline" :
  {
    "description": "_description",
    "processors": [
      {
        "rename" : {
          "field" : "{{foo}}",
          "target_field": "bar",
          "ignore_missing": true
        }
      }
    ]
  },
  "docs": [
    {
      "_index": "index",
      "_id": "id",
      "_source": {
        "message": "test"
      }
    }
  ]
}

The result is :

{
  "docs": [
    {
      "error": {
        "root_cause": [
          {
            "type": "illegal_argument_exception",
            "reason": "path cannot be null nor empty"
          }
        ],
        "type": "illegal_argument_exception",
        "reason": "path cannot be null nor empty"
      }
    }
  ]
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @matriv@gaobinlong@elasticmachine@danhermann

        Issue actions

          ignore_missing takes no effect when use template snippets in Rename Ingest Processor · Issue #74241 · elastic/elasticsearch