Hello,
I need to shrink an index called log_index_ARC (too many shards/replicas).
Also, i want after shrink process, add an alias on new shrink index (log_index_ARC-shrink) to log_index_ARC (original value so).
Here my action file :
$index=log_index_ARC
actions:
1:
action: shrink
description: "Shrink index to have a different number of shards"
options:
disable_action: False
ignore_empty_list: True
shrink_node: DETERMINISTIC
node_filters:
permit_masters: False
number_of_shards: 2
number_of_replicas: 1
shrink_prefix:
shrink_suffix: '-shrink' # adds the shrink suffix which later I want to remove
delete_after: True
post_allocation:
allocation_type: include
key: node_tag
value: cold
wait_for_active_shards: 1
wait_for_completion: True
wait_for_rebalance: True
wait_interval: 9
max_wait: -1
filters:
- filtertype: pattern
kind: prefix
value: "'"$index"'"
2:
action: alias
description: "Add/Remove selected indices to or from the specified alias"
options:
name: "'"$index"'"
add:
filters:
- filtertype: pattern
kind: suffix
value: -shrink
remove:
filters:
- filtertype: pattern
kind: suffix
value: -shrink
Can u help ? I miss on alias part
Thanks