Fix simulating index templates without specified index#56295
Fix simulating index templates without specified index#56295dakrone wants to merge 1 commit intoelastic:masterfrom
Conversation
When simulating index template composition, we should not require an index name if a body is specified, instead if no index is specified we should assume the provided template matches. Relates to elastic#53101 Resolves elastic#56255
|
Pinging @elastic/es-core-features (:Core/Features/Indices APIs) |
There was a problem hiding this comment.
@dakrone thanks for working on this. I think the code looks good, if we decide to go forward with this.
edit: after looking at #56255 I noticed you already proposed using the same index name as the templated index pattern (sorry jumped at the code initially)
I believe the drawbacks of maintaining an exceptional case and changing the user-defined index pattern when building the request as opposed to the user filling in an index name that matches the pattern are not worth us supporting this.
I think we should keep this endpoint as is, always requiring an index name, and expand the new API we proposed on #53101 to include a body and simulate index template composition
Add simulate API for a template ie. /_index_template/{template-name}/_simulate, without any body. It will return the final resolved version of the template (merging the component templates)
What do you think?
|
@andreidan and I discussed this and decided that rather than change the simulation API like this (which is meant for simulating an index), we're going to add a separate API under |
When simulating index template composition, we should not require an index name if a body is
specified, instead if no index is specified we should assume the provided template matches.
Relates to #53101
Resolves #56255