ccr.followedit

client.ccr.follow({
  index: string,
  wait_for_active_shards: string,
  body: object
})

Reference

index

string - The name of the follower index

wait_for_active_shards or waitForActiveShards

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)
Default: 0

body

object - The name of the leader index and other optional ccr related parameters