@@ -11,7 +11,7 @@ For the most up-to-date API details, refer to {api-es}/group/endpoint-indices[In
11
11
--
12
12
13
13
Resolves the specified index expressions to return information about
14
- each cluster, including the local cluster, if included.
14
+ each cluster, including the local "querying" cluster, if included.
15
15
16
16
This endpoint is useful before doing a <<modules-cross-cluster-search,{ccs}>> in
17
17
order to determine which remote clusters should be included in a search.
@@ -22,12 +22,13 @@ with this endpoint.
22
22
23
23
For each cluster in the index expression, information is returned about:
24
24
25
- 1. whether the querying ("local") cluster is currently connected to each remote cluster
26
- in the index expression scope
25
+ 1. whether the querying ("local") cluster was able to connect to each remote cluster
26
+ specified in the index expression. Note that this endpoint actively attempts to
27
+ contact the remote clusters, unlike the <<cluster-remote-info,remote/info>> endpoint.
27
28
2. whether each remote cluster is configured with `skip_unavailable` as `true` or `false`
28
29
3. whether there are any indices, aliases or data streams on that cluster that match
29
30
the index expression
30
- 4. whether the search is likely to have errors returned when you do the {ccs} (including any
31
+ 4. whether the search is likely to have errors returned when you do a {ccs} (including any
31
32
authorization errors if your user does not have permission to query a remote cluster or
32
33
the indices on that cluster)
33
34
5. (in some cases) cluster version information, including the Elasticsearch server version
@@ -41,7 +42,6 @@ Once the proper security permissions are obtained, then you can rely on the `con
41
42
in the response to determine whether the remote cluster is available and ready for querying.
42
43
====
43
44
44
-
45
45
////
46
46
[source,console]
47
47
--------------------------------
@@ -129,11 +129,25 @@ deprecated:[7.16.0]
129
129
130
130
[discrete]
131
131
[[usecases-for-resolve-cluster]]
132
+ === Test availability of remote clusters
133
+
134
+ The <<cluster-remote-info,remote/info>> endpoint is commonly used to test whether the "local"
135
+ cluster (the cluster being queried) is connected to its remote clusters, but it does not
136
+ necessarily reflect whether the remote cluster is available or not. The remote cluster may
137
+ be available, while the local cluster is not currently connected to it.
138
+
139
+ You can use the resolve-cluster API to attempt to reconnect to remote clusters
140
+ (for example with `GET _resolve/cluster/*:*`) and
141
+ the `connected` field in the response will indicate whether it was successful or not.
142
+ If a connection was (re-)established, this will also cause the
143
+ <<cluster-remote-info,remote/info>> endpoint to now indicate a connected status.
144
+
145
+
132
146
=== Advantages of using this endpoint before a {ccs}
133
147
134
148
You may want to exclude a cluster or index from a search when:
135
149
136
- 1. A remote cluster is not currently connected and is configured with `skip_unavailable`=`false`.
150
+ 1. A remote cluster could not be connected to and is configured with `skip_unavailable`=`false`.
137
151
Executing a {ccs} under those conditions will cause
138
152
<<cross-cluster-search-failures,the entire search to fail>>.
139
153
@@ -247,14 +261,7 @@ GET /_resolve/cluster/not-present,clust*:my-index*,oldcluster:*?ignore_unavailab
247
261
},
248
262
"cluster_two": {
249
263
"connected": false, <3>
250
- "skip_unavailable": false,
251
- "matching_indices": true,
252
- "version": {
253
- "number": "8.13.0",
254
- "build_flavor": "default",
255
- "minimum_wire_compatibility_version": "7.17.0",
256
- "minimum_index_compatibility_version": "7.0.0"
257
- }
264
+ "skip_unavailable": false
258
265
},
259
266
"oldcluster": { <4>
260
267
"connected": true,
0 commit comments