Skip to content

When putting new dynamic templates, all existing templates are overwritten. #30274

@jtibshirani

Description

@jtibshirani

Elasticsearch version (bin/elasticsearch --version): 6.2.3

Description of the problem including expected versus actual behavior:

Putting new mappings for dynamic_template overwrites all existing templates, even templates that the put mappings request does not mention. This behavior conflicts with what's described in the dynamic templates documentation:

New templates can be appended to the end of the list with the PUT mapping API. If a new template has the same name as an existing template, it will replace the old version.

If we're happy with the behavior described in the documentation, we should update the mapping merge logic to obey those semantics.

Steps to reproduce:

Please see the following gist: https://gist.github.com/jtibshirani/52d913410957b502d6037f02d1f1340a

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