doc-exports/docs/css/umn/en-us_topic_0000001528379265.html
Zheng, Xiu 2dfeaff8f9 css umn 23.5.1 20240520
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Zheng, Xiu <zhengxiu@huawei.com>
Co-committed-by: Zheng, Xiu <zhengxiu@huawei.com>
2024-06-06 16:15:58 +00:00

6.5 KiB

Matching Index Synchronization

The request URL and request body parameters are as follows:

PUT auto_sync/pattern/{pattern_name}
Table 1 Request body parameters

Parameter

Description

remote_cluster

Name of the primary cluster. The default name is leader1. You can change the name by configuring the primary cluster information.

remote_index_patterns

Mode of the index to be synchronized in the primary cluster. The wildcard (*) is supported.

local_index_pattern

Mode of the index being synchronized in the secondary cluster. The template can be replaced. For example, if this parameter is set to {{remote_index}}-sync, the index log1 change to log1-sync after synchronization.

apply_exist_index

Whether to synchronize existing indexes in the primary cluster. The default value is true.

settings

Index settings of the index being synchronized

The following are two examples:

1. Synchronize a single index from the primary cluster to the secondary cluster.

PUT auto_sync/pattern/pattern1
{
 "remote_cluster": "leader1",
 "remote_index_patterns": "log*",
 "local_index_pattern": "{{remote_index}}-sync",
 "apply_exist_index": true
}

2. Synchronize a single index from the primary cluster to the secondary cluster and modify the index configurations.

PUT auto_sync/pattern/pattern1
{
 "remote_cluster": "leader1",
 "remote_index_patterns": "log*",
 "local_index_pattern": "{{remote_index}}-sync",
 "apply_exist_index": true,
 "settings": {
   "number_of_replicas": 4
 }
}

The following index configurations cannot be modified:

  • number_of_shards
  • version.created
  • uuid
  • creation_date
  • soft_deletes.enabled