This is a Technical Preview and should not yet be used in production.
Actions Overview
Content
Basics
Actions can be used to change the state or behavior of an index. Steps may contain no actions, one action, or multiple actions. If there are multiple actions defined in one step the actions get executed in the defined order.
Actions get executed when the step is triggered and at least one condition is met. If the step does not contain conditions, the actions get executed when the step is entered.
Every action has a type
field that defines the action type. Some actions have additional configuration variables.
Available Actions
Supported actions are:
- allocation: Changes the allocation settings for the index.
- close: Closes the index.
- delete: Deletes the index permanently.
- force_merge: Force merges the index shards.
- rollover: Rolls the index over.
- set_priority: Sets the priority of the index.
- set_read_only: Changes the index to read only mode.
- set_replica_count: Sets the number of replicas the index should have.
- snapshot: Takes a snapshot of the entire index.
Example
{
"steps": [
...
{
"name": "my-rollover-step",
"conditions": [],
"actions": [
{
"type": "rollover"
},
{
"type": "set_read_only"
},
{
"type": "force_merge",
"segments": 1
}
]
},
...
]
}
In the example above, the index would be rolled over when my-rollover-step
is entered.
After the index is rolled over successfully, it would be set the read only mode and force merge into one segment.