By default, networks between Alibaba Cloud Elasticsearch (ES) instances are isolated for security purposes. To use the cross-cluster search feature, you must first establish network connectivity between the two instances. This topic describes how to configure network connectivity between instances to enable cross-cluster search.
Usage notes
To enable cross-cluster search between two ES clusters, you must first establish network connectivity. The clusters must meet the following conditions:
Both clusters must use the v2 basic control architecture and be located in the same Virtual Private Cloud (VPC).
ES clusters support three control architecture deployment modes: basic control (v1 architecture), basic control (v2 architecture), and cloud-native control (v3 architecture). You can view the architecture of a cluster on its Basic Information page.

The clusters must be version 6.7.0 or later.
Cross-cluster search is not supported between clusters that have both OpenStore and IndexingService enabled and clusters of other types.
The number of interconnected clusters is limited based on the following formula:
sum(number of roles in a cluster * number of zones for a cluster) ≤ 20.Example: Cluster A needs to connect to Cluster B and Cluster C simultaneously. Each cluster has three roles (Master, coordinating, and data) and is deployed in three zones.
Calculation:
(3 roles × 3 zones) × 3 clusters = 27. This is greater than 20, so the limit is exceeded. Cluster A cannot connect to both Cluster B and Cluster C at the same time.
Procedure
Step 1: Configure network connectivity between clusters
Log on to the Alibaba Cloud Elasticsearch console.
In the left-side navigation pane, click Elasticsearch Clusters.
Navigate to the desired cluster.
In the top navigation bar, select the resource group to which the cluster belongs and the region where the cluster resides.
On the Elasticsearch Clusters page, find the cluster and click its ID.
In the navigation pane on the left, choose .
In the Network Settings section, next to Cluster Interconnection, click Modify.
On the Modify page, click Add Cluster.
In the Add Cluster dialog box, select the remote instance that you want to connect to.
ImportantA Resource Access Management (RAM) user must have the `ListInstance` permission to retrieve all instances in the corresponding Alibaba Cloud account. For more information, see Grant permissions to an Elasticsearch instance.
After you configure network connectivity between instances, the current instance also appears on the Cluster Interconnection page of the remote instance. The network connection is bi-directional. For example, configuring a connection from instance A to instance B also establishes a connection from instance B to instance A.
Click OK.
After adding an instance, you can view the list of connected instances on the Modify Configuration page.
NoteIf you no longer need the connection, you can remove the interconnected instance by clicking Remove.
Step 2: Configure cross-cluster search
After you configure instance network connectivity, you must also configure cross-cluster search. This lets you search for data in a remote instance from the current instance.
Prepare test data in the remote Elasticsearch instance.
NoteThis step helps you verify the cross-cluster search feature. If your remote instance already contains data for testing, you can skip this step.
Log on to the Kibana console of the remote Elasticsearch instance and go to the Kibana homepage.
For more information about how to log on to the Kibana console, see Log on to the Kibana console.
NoteIn this example, an Elasticsearch V6.7.0 cluster is used. Operations on clusters of other versions may differ. The actual operations in the console prevail.
In the left navigation pane, click Dev Tools.
In the Console, run the following commands to create an index and insert a document into the remote instance.
The following sample commands are used:
Create an index
PUT /twitter { "settings" : { "index" : { "number_of_shards" : 3, "number_of_replicas" : 2 } } }Create a document and insert data
POST twitter/_doc/ { "user" : "kimchy", "post_date" : "2009-11-15T14:12:12", "message" : "trying out Elasticsearch" }
In the current Elasticsearch instance, configure cross-cluster search and verify the configuration.
Log on to the Kibana console of the Elasticsearch instance as described in Step 1 and execute the following command to configure cross-cluster search.
The following example shows the configuration for Elasticsearch 6.7. The configuration for other versions is similar. For more information, see Cross-cluster search for Elasticsearch 7.x, Cross-cluster search for Elasticsearch 6.3, and Cross-cluster search for Elasticsearch 5.5.
The following example shows how to configure cross-cluster search using node IP addresses:
PUT _cluster/settings { "persistent": { "cluster": { "remote": { "cluster_one": { "seeds": [ "10.8.xx.xx:9300", "10.8.xx.xx:9300", "10.8.xx.xx:9300" ] } } } } }You can view the node IP addresses in the Node Visualization section on the Basic Information page of the instance. For more information, see View the cluster status and node information.
ImportantConfiguring cross-cluster search using domain names is not supported.
If you configure the node IP addresses of a remote Elasticsearch instance for cross-cluster search in the current Elasticsearch instance, you can query the index data of the remote instance only from the current instance. You cannot run similar commands in the remote instance for reverse access. To enable reverse access, you must configure the node IP addresses of the current instance in the remote instance.
Run the following command to verify the cross-cluster search configuration.
POST /cluster_one:twitter/_doc/_search { "query": { "match_all": {} } }If the verification is successful, the following result is returned.
{ "took" : 78, "timed_out" : false, "_shards" : { "total" : 3, "successful" : 3, "skipped" : 0, "failed" : 0 }, "_clusters" : { "total" : 1, "successful" : 1, "skipped" : 0 }, "hits" : { "total" : 1, "max_score" : 1.0, "hits" : [ { "_index" : "cluster_one:twitter", "_type" : "_doc", "_id" : "qudxxxxxxxxxx_7ie6J", "_score" : 1.0, "_source" : { "user" : "kimchy", "post_date" : "2009-11-15T14:12:12", "message" : "trying out Elasticsearch" } } ] } }