2020-04-28 19:38:01 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[[ilm-unfollow]]
|
|
|
|
=== Unfollow
|
|
|
|
|
2020-09-17 10:58:07 -04:00
|
|
|
Phases allowed: hot, warm, cold.
|
2020-04-28 19:38:01 -04:00
|
|
|
|
|
|
|
Converts a {ref}/ccr-apis.html[{ccr-init}] follower index into a regular index.
|
|
|
|
This enables the shrink, rollover, and searchable snapshot actions
|
|
|
|
to be be performed safely on follower indices.
|
|
|
|
You can also use unfollow directly when moving follower indices through the lifecycle.
|
|
|
|
Has no effect on indices that are not followers, phase execution just moves to the next action.
|
|
|
|
|
|
|
|
[NOTE]
|
2020-06-30 07:24:35 -04:00
|
|
|
This action is triggered automatically by the <<ilm-rollover-action, rollover>>,
|
|
|
|
<<ilm-shrink-action, shrink>>, and
|
|
|
|
<<ilm-searchable-snapshot-action, searchable snapshot>> actions when they are
|
|
|
|
applied to follower indices.
|
2020-04-28 19:38:01 -04:00
|
|
|
|
|
|
|
This action waits until is it safe to convert a follower index into a regular index.
|
|
|
|
The following conditions must be met:
|
|
|
|
|
|
|
|
* The leader index must have `index.lifecycle.indexing_complete` set to `true`.
|
|
|
|
This happens automatically if the leader index is rolled over using the
|
|
|
|
<<ilm-rollover-action, rollover>> action, and can be set manually using
|
|
|
|
the <<indices-update-settings,index settings>> API.
|
|
|
|
* All operations performed on the leader index have been replicated to the follower index.
|
|
|
|
This ensures that no operations are lost when the index is converted.
|
|
|
|
|
|
|
|
Once these conditions are met, unfollow performs the following operations:
|
|
|
|
|
|
|
|
* Pauses indexing following for the follower index.
|
|
|
|
* Closes the follower index.
|
|
|
|
* Unfollows the leader index.
|
|
|
|
* Opens the follower index (which is at this point is a regular index).
|
|
|
|
|
|
|
|
[[ilm-unfollow-options]]
|
|
|
|
==== Options
|
|
|
|
|
|
|
|
None.
|
|
|
|
|
|
|
|
[[ilm-unfollow-ex]]
|
|
|
|
==== Example
|
|
|
|
|
|
|
|
[source,console]
|
|
|
|
--------------------------------------------------
|
|
|
|
PUT _ilm/policy/my_policy
|
|
|
|
{
|
|
|
|
"policy": {
|
|
|
|
"phases": {
|
|
|
|
"hot": {
|
|
|
|
"actions": {
|
|
|
|
"unfollow" : {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-30 07:24:35 -04:00
|
|
|
--------------------------------------------------
|