Skip to content

copy_from option on set processor links rather than copies complex content #69348

@danhermann

Description

@danhermann

Elasticsearch version (bin/elasticsearch --version): 7.11.0+

Steps to reproduce:

POST _ingest/pipeline/_simulate
{
  "pipeline": {
    "processors": [
      {
        "set": {
          "field": "foo2",
          "copy_from": "foo"
        }
      },
      {
        "set": {
          "field": "foo2.bar",
          "value": "changed"
        }
      }
    ]
  },
  "docs": [
    {
      "_source": {
        "foo": {
          "bar": "baz"
        }
      }
    }
  ]
}

produces:

  "_source" : {
    "foo2" : {
      "bar" : "changed"
    },
    "foo" : {
      "bar" : "changed"
    }
  }

which shows that foo2 is linked to the content of foo and cannot be changed independently.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions