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

Provide an Explain API or functionality for index templates #53529

Closed
geekpete opened this issue Mar 13, 2020 · 2 comments
Closed

Provide an Explain API or functionality for index templates #53529

geekpete opened this issue Mar 13, 2020 · 2 comments
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >enhancement

Comments

@geekpete
Copy link
Member

Describe the feature:

Provide an API to explain which templates will affect a provided index name and the reveal the order the templates would apply.
Perhaps also return the resulting final combined template that would be applied to the given index name.
All of the code to do apply this already exists, the Explain functionality would essentially be a dry-run version of the code with additional detailed output.

This would greatly help in troubleshooting and reasoning about templates, especially when there's many templates that might affect an index in complex ways with inheritance.

It should also highlight when templates apply that have the same order value and warn that these will apply non-deterministically and potentially suggest not using the same order value.

This functionality would be immediately useful with the current index templates design that uses inheritance.

For the v2 templates design where a template can use other component templates, the Explain functionality might assist users in migrating from v1 templates to v2 templates with suggestions on what conversions or sections of templates could be changed into v2 component templates with suggested order.
Or the Explain functionality could have a "convert" switch to output an equivalent v2 template scenario perhaps.

V2 Index Templates: #53101

@dakrone
Copy link
Member

dakrone commented Mar 13, 2020

@geekpete this is already part of the design for index templates v2 (search for "Simulate index template api" on #53101), so I think this can be closed as a duplicate. If I misunderstood lemme know!

@dakrone dakrone closed this as completed Mar 13, 2020
@dakrone dakrone added the :Data Management/Indices APIs APIs to create and manage indices and templates label Mar 13, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Indices APIs)

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 >enhancement
Projects
None yet
Development

No branches or pull requests

3 participants