2018-10-26 11:23:35 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="platinum"]
|
|
|
|
[[ccr-post-unfollow]]
|
|
|
|
=== Unfollow API
|
|
|
|
++++
|
|
|
|
<titleabbrev>Unfollow</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
|
|
|
Converts a follower index to a regular index.
|
|
|
|
|
2019-07-04 11:22:17 -04:00
|
|
|
[[ccr-post-unfollow-request]]
|
|
|
|
==== {api-request-title}
|
2018-10-26 11:23:35 -04:00
|
|
|
|
|
|
|
//////////////////////////
|
|
|
|
|
2019-09-09 13:38:14 -04:00
|
|
|
[source,console]
|
2018-10-26 11:23:35 -04:00
|
|
|
--------------------------------------------------
|
2019-01-29 13:47:29 -05:00
|
|
|
PUT /follower_index/_ccr/follow?wait_for_active_shards=1
|
2018-10-26 11:23:35 -04:00
|
|
|
{
|
|
|
|
"remote_cluster" : "remote_cluster",
|
|
|
|
"leader_index" : "leader_index"
|
|
|
|
}
|
|
|
|
|
|
|
|
POST /follower_index/_ccr/pause_follow
|
|
|
|
|
|
|
|
POST /follower_index/_close
|
|
|
|
--------------------------------------------------
|
|
|
|
// TESTSETUP
|
|
|
|
// TEST[setup:remote_cluster_and_leader_index]
|
|
|
|
|
|
|
|
//////////////////////////
|
|
|
|
|
2019-09-09 13:38:14 -04:00
|
|
|
[source,console]
|
2018-10-26 11:23:35 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
POST /<follower_index>/_ccr/unfollow
|
|
|
|
--------------------------------------------------
|
|
|
|
// TEST[s/<follower_index>/follower_index/]
|
|
|
|
|
2019-07-04 11:22:17 -04:00
|
|
|
[[ccr-post-unfollow-prereqs]]
|
|
|
|
==== {api-prereq-title}
|
2018-11-21 18:01:59 -05:00
|
|
|
|
2019-07-04 11:22:17 -04:00
|
|
|
* If the {es} {security-features} are enabled, you must have `manage_follow_index`
|
2018-11-21 18:01:59 -05:00
|
|
|
index privileges for the follower index. For more information, see
|
|
|
|
{stack-ov}/security-privileges.html[Security privileges].
|
2018-10-26 11:23:35 -04:00
|
|
|
|
2019-07-04 11:22:17 -04:00
|
|
|
[[ccr-post-unfollow-desc]]
|
|
|
|
==== {api-description-title}
|
|
|
|
|
|
|
|
This API stops the following task associated with a follower index and removes
|
|
|
|
index metadata and settings associated with {ccr}. This enables the index to
|
|
|
|
treated as a regular index. The follower index must be paused and closed before
|
|
|
|
invoking the unfollow API.
|
|
|
|
|
|
|
|
NOTE: Currently {ccr} does not support converting an existing regular index to a
|
|
|
|
follower index. Converting a follower index to a regular index is an
|
|
|
|
irreversible operation.
|
|
|
|
|
|
|
|
[[ccr-post-unfollow-path-parms]]
|
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`<follower_index>`::
|
|
|
|
(Required, string) The name of the follower index.
|
2019-07-04 11:22:17 -04:00
|
|
|
|
|
|
|
[[ccr-post-unfollow-examples]]
|
|
|
|
==== {api-examples-title}
|
2018-10-26 11:23:35 -04:00
|
|
|
|
|
|
|
This example converts `follower_index` from a follower index to a regular index:
|
|
|
|
|
2019-09-09 13:38:14 -04:00
|
|
|
[source,console]
|
2018-10-26 11:23:35 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
POST /follower_index/_ccr/unfollow
|
|
|
|
--------------------------------------------------
|
|
|
|
// TEST
|
|
|
|
|
|
|
|
The API returns the following result:
|
|
|
|
|
2019-09-06 09:22:08 -04:00
|
|
|
[source,console-result]
|
2018-10-26 11:23:35 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
{
|
|
|
|
"acknowledged" : true
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|