Skip to content

Detect when copying to a non-existent field when dynamic mappings are disabled #112812

Open
@Mikep86

Description

@Mikep86

Description

We should be able to detect when a user is attempting to use copy_to to copy to a non-existent field when dynamic mappings are disabled. For example:

PUT test-index
{
  "mappings": {
    "dynamic": false,
    "properties": {
      "test_field": {
        "type": "text",
        "copy_to": "missing_field"
      }
    }
  }
}

Currently, this request succeeds even though nothing will ever be copied to missing_field. We should throw a 400 error in this case to indicate to the user that their mappings are invalid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions