Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit a deprecation warning when a typed index template is triggered. #37741

Conversation

jtibshirani
Copy link
Contributor

@jtibshirani jtibshirani commented Jan 23, 2019

This is an experiment/ work in progress and is not ready for review.

This PR adds a deprecation warning each time an index template is triggered that has a custom mapping type. If the template metadata has no mappings, or a single type with name _doc, then we do not emit a warning.

For context, even if an index template's mapping was created without a type, we are continuing to store the template with the dummy type name _doc. This makes the code easier to reason about, because in 7.x we need to be able to support typed templates as well, and potentially communicate with 6.x nodes. In 8.x, once we know there are no more custom types, we can likely migrate all stored templates to be typeless.

Note that there is a separate PR to deprecate types in put + get index template requests (#37484).

@jtibshirani jtibshirani added :Search Foundations/Mapping Index mappings, including merging and defining field types :Data Management/Indices APIs APIs to create and manage indices and templates >deprecation v7.0.0 v6.7.0 labels Jan 23, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

@jtibshirani
Copy link
Contributor Author

I decided that this doesn't make sense, since we have several internal templates that still use the custom type name doc. I will revive the PR if we come to a different conclusion after discussing it.

@jtibshirani jtibshirani deleted the deprecate-types-in-index-templates branch January 25, 2019 00:29
@danielmitterdorfer
Copy link
Member

@jtibshirani I am removing all version labels from this PR for the time being to avoid this is mistakenly included in any release notes. Please reapply them accordingly in case you reopen the PR. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >deprecation :Search Foundations/Mapping Index mappings, including merging and defining field types WIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants