mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-08 05:58:44 +00:00
Today when creating a follower index via the put follow API, or via an auto-follow pattern, it is not possible to specify settings overrides for the follower index. Instead, we copy all of the leader index settings to the follower. Yet, there are cases where a user would want some different settings on the follower index such as the number of replicas, or allocation settings. This commit addresses this by allowing the user to specify settings overrides when creating follower index via manual put follower calls, or via auto-follow patterns. Note that not all settings can be overrode (e.g., index.number_of_shards) so we also have detection that prevents attempting to override settings that must be equal between the leader and follow index. Note that we do not even allow specifying such settings in the overrides, even if they are specified to be equal between the leader and the follower index. Instead, the must be implicitly copied from the leader index, not explicitly set by the user.
43 lines
1.3 KiB
Plaintext
43 lines
1.3 KiB
Plaintext
--
|
|
:api: ccr-put-follow
|
|
:request: PutFollowRequest
|
|
:response: PutFollowResponse
|
|
--
|
|
[role="xpack"]
|
|
[id="{upid}-{api}"]
|
|
=== Put Follow API
|
|
|
|
|
|
[id="{upid}-{api}-request"]
|
|
==== Request
|
|
|
|
The Put Follow API allows creates a follower index and make that index follow a leader index.
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
--------------------------------------------------
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
|
--------------------------------------------------
|
|
<1> The name of the remote cluster alias.
|
|
<2> The name of the leader in the remote cluster.
|
|
<3> The name of the follower index that gets created as part of the put follow API call.
|
|
<4> The number of active shard copies to wait for before the put follow API returns a
|
|
response, as an `ActiveShardCount`
|
|
<5> The settings overrides for the follower index.
|
|
|
|
[id="{upid}-{api}-response"]
|
|
==== Response
|
|
|
|
The returned +{response}+ indicates if the put follow request was received.
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
--------------------------------------------------
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
|
--------------------------------------------------
|
|
<1> Whether the follower index was created.
|
|
<2> Whether the follower shards are started.
|
|
<3> Whether the follower index started following the leader index.
|
|
|
|
include::../execution.asciidoc[]
|
|
|
|
|