-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Allow setting of copy_settings
in the HLRC
#39752
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
Changes from 6 commits
27b0e2c
fe987aa
5f05978
ce68119
e4b6cb4
27aaf3e
de8ca18
b20c245
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1683,9 +1683,13 @@ public void testShrinkIndex() throws Exception { | |
request.setWaitForActiveShards(2); // <1> | ||
request.setWaitForActiveShards(ActiveShardCount.DEFAULT); // <2> | ||
// end::shrink-index-request-waitForActiveShards | ||
// tag::shrink-index-request-copySettings | ||
request.setCopySettings(Boolean.TRUE); // <1> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in de8ca18 |
||
// end::shrink-index-request-copySettings | ||
// tag::shrink-index-request-settings | ||
request.getTargetIndexRequest().settings(Settings.builder() | ||
.put("index.number_of_shards", 2)); // <1> | ||
.put("index.number_of_shards", 2) // <1> | ||
.putNull("index.routing.allocation.require._name")); // <2> | ||
// end::shrink-index-request-settings | ||
// tag::shrink-index-request-aliases | ||
request.getTargetIndexRequest().alias(new Alias("target_alias")); // <1> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,12 +47,21 @@ returns a response, as an `int` | |
<2> The number of active shard copies to wait for before the shrink index API | ||
returns a response, as an `ActiveShardCount` | ||
|
||
["source","java",subs="attributes,callouts,macros"] | ||
-------------------------------------------------- | ||
include-tagged::{doc-tests-file}[{api}-request-copySettings] | ||
-------------------------------------------------- | ||
<1> Use `Boolean.TRUE` to copy the settings from the source index to the target | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in de8ca18 |
||
index. This cannot be `Boolean.FALSE`. If this method is not used, default behavior is not to copy. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in de8ca18 |
||
This parameter will be removed in 8.0.0. | ||
|
||
["source","java",subs="attributes,callouts,macros"] | ||
-------------------------------------------------- | ||
include-tagged::{doc-tests-file}[{api}-request-settings] | ||
-------------------------------------------------- | ||
<1> The settings to apply to the target index, which include the number of | ||
shards to create for it | ||
<2> Remove the allocation requirement copied from the source index | ||
|
||
["source","java",subs="attributes,callouts,macros"] | ||
-------------------------------------------------- | ||
|
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.
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.
Fixed in b20c245