Create a follower Added in 6.5.0

PUT /{index}/_ccr/follow

Create a cross-cluster replication follower index that follows a specific leader index. When the API returns, the follower index exists and cross-cluster replication starts replicating operations from the leader index to the follower index.

Path parameters

  • index string Required

    The name of the follower index

Query parameters

  • wait_for_active_shards number | string

    Sets the number of shard copies that must be active before returning. Defaults to 0. Set to all for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)

application/json

Body Required

Responses

PUT /{index}/_ccr/follow
curl \
 -X PUT http://api.example.com/{index}/_ccr/follow \
 -H "Content-Type: application/json" \
 -d '{"leader_index":"string","max_outstanding_read_requests":42.0,"max_outstanding_write_requests":42.0,"max_read_request_operation_count":42.0,"max_read_request_size":"string","max_retry_delay":"string","max_write_buffer_count":42.0,"max_write_buffer_size":"string","max_write_request_operation_count":42.0,"max_write_request_size":"string","read_poll_timeout":"string","remote_cluster":"string"}'
Request examples
{
  "leader_index": "string",
  "max_outstanding_read_requests": 42.0,
  "max_outstanding_write_requests": 42.0,
  "max_read_request_operation_count": 42.0,
  "max_read_request_size": "string",
  "max_retry_delay": "string",
  "max_write_buffer_count": 42.0,
  "max_write_buffer_size": "string",
  "max_write_request_operation_count": 42.0,
  "max_write_request_size": "string",
  "read_poll_timeout": "string",
  "remote_cluster": "string"
}
Response examples (200)
{
  "follow_index_created": true,
  "follow_index_shards_acked": true,
  "index_following_started": true
}