Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions _api-reference/index-apis/shrink-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,4 @@ You can use the request body to configure some index settings for the target ind
Field | Type | Description
alias | Object | Sets an alias for the target index. Can have the fields `filter`, `index_routing`, `is_hidden`, `is_write_index`, `routing`, and `search_routing`. See [Index Aliases]({{site.url}}{{site.baseurl}}/api-reference/alias/#request-body).
settings | Object | Index settings you can apply to your target index. See [Index Settings]({{site.url}}{{site.baseurl}}/api-reference/index-apis/create-index/#index-settings).

{% comment %}
The new parameter to be called max_shard_size.
max_primary_shard_size | Bytes | Sets the maximum size of a primary shard in the target index. For example, if this field is set to 100 GB, and the source index's primary shards total to 300 GB, then the target index has 3 primary shards of 100 GB each.
{% endcomment %}
max_shard_size | Bytes | Sets the maximum size of a primary shard in the target index. `max_shard_size` calculates the target index's primary shard count and the primary shards' storage in the source index. The primary shard count of the target index is the lowest factor of the source index's primary shard count which satisfies this field's requirement. For example, if `max_shard_size` is set to `100 GB`, and the source index's primary shards total to `300 GB` and the count is `6`, then the target index has **3 primary shards of 100 GB each**. If the source index's primary shards total to `600GB` and count is `5`, then the target index will have **5 primary shards**. Because `max_shard_size` conflicts with `index.number_of_shards` in `settings` you can not set both of them at the same time.
Copy link
Collaborator

Choose a reason for hiding this comment

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

@gaobinlong After looking at the code, I think we might want to break this parameter out in a separate section with more explanations and a non-trivial example. We might also want to mention the max and min for the number of primary shards in the target index. Do you mind if I take over this PR and try to do this, and you can review for technical accuracy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kolchfa-aws sure, you can do it, and feel free to ping me if you need some help.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@gaobinlong Could you please review the new PR for technical accuracy? #2519

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure,I've added some comments for the new PR, you can take a look.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@gaobinlong Somehow I don't see any comments on #2519. I don't know if it's a problem on my end. Would you mind confirming that they are there?