-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Add HLRC support for simulate index template api #55936
Conversation
Pinging @elastic/es-core-features (:Core/Features/Indices APIs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I left two minor comments, thanks Andrei!
* Set the index name to simulate template matching against the index templates in the system. | ||
*/ | ||
public SimulateIndexTemplateRequest indexName(String indexName) { | ||
this.indexName = indexName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We validate the indexName
in the constructor but maybe we should also validate it here?
} | ||
|
||
@Override | ||
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems strange to have a toXContent that produces a body that isn't actually what gets sent (since we don't include the index name in the request body for simulation), do we actually need this method? Can we remove it entirely?
(cherry picked from commit 475790c) Signed-off-by: Andrei Dan <[email protected]>
(cherry picked from commit 475790c) Signed-off-by: Andrei Dan <[email protected]>
Relates to #53101