-
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 prefer_v2_templates parameter to Reindex #56253
Add prefer_v2_templates parameter to Reindex #56253
Conversation
Pinging @elastic/es-core-features (:Core/Features/Indices APIs) |
@elasticmachine update branch |
user doesn't have permission to update head repository |
@elasticmachine update branch |
user doesn't have permission to update head repository |
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.
Thanks for doing this @probakowski! I left two really minor comments that are just related to BWC for the request, otherwise this looks good to me!
server/src/main/java/org/elasticsearch/index/reindex/ReindexRequest.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/reindex/ReindexRequest.java
Outdated
Show resolved
Hide resolved
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, thanks Przemko
@@ -68,6 +68,11 @@ protected ReindexRequest buildRequest(RestRequest request) throws IOException { | |||
if (request.hasParam("scroll")) { | |||
internal.setScroll(parseTimeValue(request.param("scroll"), "scroll")); | |||
} | |||
|
|||
if (request.hasParam("prefer_v2_templates")) { | |||
internal.preferV2Templates(Boolean.parseBoolean(request.param("prefer_v2_templates"))); |
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.
for 8.0 we want this to default to true
if it's not specified by the user (this is just a reminder to change this after backport)
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.
I wonder if we should change it here or simply pass null down the road and let create index request pick up correct default (for making it DRY and using only single place to set defaults)
@elasticmachine run elasticsearch-ci/2 |
* prefer_v2_templates for reindex
Relates to #53101