-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Adds write_index_only option to put mapping API #59396
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
Conversation
Pinging @elastic/es-core-features (:Core/Features/Data streams) |
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
@@ -67,6 +67,7 @@ public RestChannelConsumer prepareRequest(final RestRequest request, final NodeC | |||
putMappingRequest.timeout(request.paramAsTime("timeout", putMappingRequest.timeout())); | |||
putMappingRequest.masterNodeTimeout(request.paramAsTime("master_timeout", putMappingRequest.masterNodeTimeout())); | |||
putMappingRequest.indicesOptions(IndicesOptions.fromRequest(request, putMappingRequest.indicesOptions())); | |||
putMappingRequest.writeIndexOnly(request.paramAsBoolean("write_index_only", false)); |
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 think we need to add this parameter to rest spec as well?
|
||
ClusterState cs = DeleteDataStreamRequestTests.getClusterStateWithDataStreams(dsMetadata, List.of("index1", "index2", "index3")); | ||
final ClusterState cs2 = addAliases(cs, List.of( | ||
tuple("alias1", List.of(tuple("index1", false), tuple("index2", true))), |
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 think this test fails? since index2 is write index?
Adds a
write_index_only
option to the put mapping API that defaults tofalse
. Whenfalse
, the put mapping API applies any mapping changes to all the indices to which any specified data streams and aliases expand. Whentrue
, the put mapping API will apply the changes only to the write index for any specified data streams and aliases.Relates to #53100