Unfollow API
Converts a cross-cluster replication follower index to a regular index.
Request
resp = client.ccr.unfollow(
index="<follower_index>",
)
print(resp) const response = await client.ccr.unfollow({
index: "<follower_index>",
});
console.log(response); POST /<follower_index>/_ccr/unfollow
Prerequisites
- If the Elasticsearch security features are enabled, you must have
manage_follow_indexindex privileges for the follower index. For more information, see Security privileges.
Description
This API stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication. This enables the index to treated as a regular index. The follower index must be paused and closed before invoking the unfollow API.
Currently cross-cluster replication does not support converting an existing regular index to a follower index. Converting a follower index to a regular index is an irreversible operation.
Path parameters
-
<follower_index> - (Required, string) The name of the follower index.
Query parameters
-
master_timeout - (Optional, time units) Period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. Defaults to
30s. Can also be set to-1to indicate that the request should never timeout.
Examples
This example converts follower_index from a follower index to a regular index:
resp = client.ccr.unfollow(
index="follower_index",
)
print(resp) response = client.ccr.unfollow( index: 'follower_index' ) puts response
const response = await client.ccr.unfollow({
index: "follower_index",
});
console.log(response); POST /follower_index/_ccr/unfollow
The API returns the following result:
{
"acknowledged" : true
}
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ccr-post-unfollow.html