Skip to content

Remove number_of_shards setting from clone API example #5073

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

Merged

Conversation

PeteGillinElastic
Copy link
Member

@PeteGillinElastic PeteGillinElastic commented Aug 4, 2025

This setting is allowed only if the number of shards matches that of the source index, and that's the behaviour anyway, so it is needlessly confusing to include it here.

This setting is allowed only if the number of shards matches that of
the source index, and that's the behaviour anyway, so it is needlessly
confusing to include it here.
@PeteGillinElastic PeteGillinElastic changed the title Clone indices example remove number of shards Remove number_of_shards setting from clone API example Aug 4, 2025
@PeteGillinElastic PeteGillinElastic force-pushed the clone-indices-example-remove-number-of-shards branch from d04a890 to dfc8d73 Compare August 4, 2025 15:01
@PeteGillinElastic PeteGillinElastic added the skip-backport This pull request should not be backported label Aug 4, 2025
Copy link
Contributor

github-actions bot commented Aug 4, 2025

Following you can find the validation changes against the target branch for the APIs.

No changes detected.

You can validate these APIs yourself by using the make validate target.

@PeteGillinElastic PeteGillinElastic marked this pull request as ready for review August 4, 2025 15:04
@@ -6,12 +6,6 @@ description: >
# type: request
value: "{

\ \"settings\": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the description says "The API accepts settings and aliases parameters for the target index", can we keep an example of updating the settings here? Perhaps we can use index.refresh_interval instead of the primary shards one?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's a good idea. Done. (I had considered doing something like this, but I couldn't think of any settings that one would be likely to specify while cloning. I would guess that most clones are "clean" copies, though I could be wrong.)

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@PeteGillinElastic PeteGillinElastic merged commit 4ff06a6 into main Aug 4, 2025
8 checks passed
@PeteGillinElastic PeteGillinElastic deleted the clone-indices-example-remove-number-of-shards branch August 4, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-backport This pull request should not be backported specification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants