File: option_number_of_shards.md

package info (click to toggle)
elasticsearch-curator 8.0.21-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,716 kB
  • sloc: python: 17,838; makefile: 159; sh: 156
file content (35 lines) | stat: -rw-r--r-- 852 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
mapped_pages:
  - https://www.elastic.co/guide/en/elasticsearch/client/curator/current/option_number_of_shards.html
---

# number_of_shards [option_number_of_shards]

::::{note}
This setting is only used by the [shrink](/reference/shrink.md) action.
::::


```yaml
action: shrink
description: >-
  Shrink selected indices on the node with the most available space.
  Set the number of shards to 2.
options:
  shrink_node: DETERMINISTIC
  number_of_shards: 2
filters:
  - filtertype: ...
```

The value of this setting determines the number of primary shards in the target index.  The default value is `1`.

::::{important}
The value for `number_of_shards` must meet the following criteria:

* It must be lower than the number of primary shards in the source index.
* It must be a factor of the number of primary shards in the source index.

::::