You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: explore-analyze/query-filter/languages/esql-cross-clusters.md
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -202,7 +202,7 @@ FROM *:my-index-000001
202
202
203
203
## Cross-cluster metadata [ccq-cluster-details]
204
204
205
-
Using the `"include_ccs_metadata": true` option, users can request that ES|QL {{ccs}} responses include metadata about the search on each cluster (when the response format is JSON). Here we show an example using the async search endpoint. {{ccs-cap}} metadata is also present in the synchronous search endpoint response when requested.
205
+
Using the `"include_ccs_metadata": true` option, users can request that ES|QL {{ccs}} responses include metadata about the search on each cluster (when the response format is JSON). Here we show an example using the async search endpoint. {{ccs-cap}} metadata is also present in the synchronous search endpoint response when requested. If the search returns partial results and there are partial shard or remote cluster failures, `_clusters` metadata containing the failures will be included in the response regardless of the `include_ccs_metadata` parameter.
206
206
207
207
```console
208
208
POST /_query/async?format=json
@@ -289,8 +289,8 @@ Which returns:
289
289
4. If you included indices from the local cluster you sent the request to in your {{ccs}}, it is identified as "(local)".
290
290
5. How long (in milliseconds) the search took on each cluster. This can be useful to determine which clusters have slower response times than others.
291
291
6. The shard details for the search on that cluster, including a count of shards that were skipped due to the can-match phase results. Shards are skipped when they cannot have any matching data and therefore are not included in the full ES|QL query.
292
-
7. The `is_partial` field is set to `true` if the search has partial results for any reason, for example if it was interrupted before finishing using the [async query stop API](https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-stop-api.html).
293
-
292
+
7. The `is_partial` field is set to `true` if the search has partial results for any reason, for example due to partial shard failures,
293
+
failures in remote clusters, or if the async query was stopped by calling the [async query stop API](https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-stop-api.html).
294
294
295
295
The cross-cluster metadata can be used to determine whether any data came back from a cluster. For instance, in the query below, the wildcard expression for `cluster-two` did not resolve to a concrete index (or indices). The cluster is, therefore, marked as *skipped* and the total number of shards searched is set to zero.
296
296
@@ -312,7 +312,7 @@ Which returns:
312
312
{
313
313
"is_running": false,
314
314
"took": 55,
315
-
"is_partial": false,
315
+
"is_partial": true, <3>
316
316
"columns": [
317
317
...
318
318
],
@@ -321,9 +321,9 @@ Which returns:
321
321
],
322
322
"_clusters": {
323
323
"total": 2,
324
-
"successful": 2,
324
+
"successful": 1,
325
325
"running": 0,
326
-
"skipped": 0,
326
+
"skipped": 1, <1>
327
327
"partial": 0,
328
328
"failed": 0,
329
329
"details": {
@@ -356,6 +356,7 @@ Which returns:
356
356
357
357
1. This cluster is marked as *skipped*, since there were no matching indices on that cluster.
358
358
2. Indicates that no shards were searched (due to not having any matching indices).
359
+
3. Since one of the clusters is skipped, the search result is marked as partial.
0 commit comments