@@ -11,9 +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 "querying" cluster, if included. If no index expression
15
- is provided, this endpoint will return information about all the remote
16
- clusters that are configured on the querying cluster.
14
+ each cluster, including the local "querying" cluster, if included.
17
15
18
16
This endpoint is useful before doing a <<modules-cross-cluster-search,{ccs}>> in
19
17
order to determine which remote clusters should be included in a search.
@@ -24,10 +22,12 @@ with this endpoint.
24
22
25
23
For each cluster in scope, information is returned about:
26
24
27
- 1. whether the querying ("local") cluster is currently connected to it
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.
28
28
2. whether each remote cluster is configured with `skip_unavailable` as `true` or `false`
29
29
3. whether there are any indices, aliases or data streams on that cluster that match
30
- the index expression (if one provided)
30
+ the index expression
31
31
4. whether the search is likely to have errors returned when you do a {ccs} (including any
32
32
authorization errors if your user does not have permission to query a remote cluster or
33
33
the indices on that cluster)
@@ -42,12 +42,6 @@ Once the proper security permissions are obtained, then you can rely on the `con
42
42
in the response to determine whether the remote cluster is available and ready for querying.
43
43
====
44
44
45
- NOTE: When querying older clusters that do not support the _resolve/cluster endpoint
46
- without an index expression, the local cluster will send the index expression `dummy*`
47
- to those remote clusters, so if an errors occur, you may see a reference to that index
48
- expression even though you didn't request it. If it causes a problem, you can instead
49
- include an index expression like `*:*` to this endpoint to bypass the issue.
50
-
51
45
////
52
46
[source,console]
53
47
--------------------------------
@@ -77,14 +71,6 @@ PUT _cluster/settings
77
71
// TEST[s/35.238.149.\d+:930\d+/\${transport_host}/]
78
72
////
79
73
80
- [source,console]
81
- ----
82
- GET /_resolve/cluster
83
- ----
84
- // TEST[continued]
85
-
86
- Returns information about all remote clusters configured on the local cluster.
87
-
88
74
[source,console]
89
75
----
90
76
GET /_resolve/cluster/my-index-*,cluster*:my-index-*
@@ -140,21 +126,28 @@ ignored when frozen. Defaults to `false`.
140
126
+
141
127
deprecated:[7.16.0]
142
128
143
- [TIP]
144
- ====
145
- The index options above are only allowed when specifying an index expression.
146
- You will get an error if you specify index options to the _resolve/cluster API
147
- that takes no index expression.
148
- ====
149
-
150
129
151
130
[discrete]
152
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
+
153
146
=== Advantages of using this endpoint before a {ccs}
154
147
155
148
You may want to exclude a cluster or index from a search when:
156
149
157
- 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`.
158
151
Executing a {ccs} under those conditions will cause
159
152
<<cross-cluster-search-failures,the entire search to fail>>.
160
153
@@ -268,14 +261,7 @@ GET /_resolve/cluster/not-present,clust*:my-index*,oldcluster:*?ignore_unavailab
268
261
},
269
262
"cluster_two": {
270
263
"connected": false, <3>
271
- "skip_unavailable": false,
272
- "matching_indices": true,
273
- "version": {
274
- "number": "8.13.0",
275
- "build_flavor": "default",
276
- "minimum_wire_compatibility_version": "7.17.0",
277
- "minimum_index_compatibility_version": "7.0.0"
278
- }
264
+ "skip_unavailable": false
279
265
},
280
266
"oldcluster": { <4>
281
267
"connected": true,
0 commit comments