Skip to content

Commit d24ca5a

Browse files
authored
Document changes in partial result reporting (elastic#124928)
* Document changes in partial result reporting
1 parent 24299ab commit d24ca5a

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

docs/reference/esql/esql-across-clusters.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ which clusters have slower response times than others.
293293
skipped due to the can-match phase results. Shards are skipped when they cannot have any matching data
294294
and therefore are not included in the full ES|QL query.
295295
<7> The `is_partial` field is set to `true` if the search has partial results for any reason,
296-
for example if it was interrupted before finishing using the <<esql-async-query-stop-api,async query stop API>>.
296+
for example if it was interrupted before finishing using the <<esql-async-query-stop-api,async query stop API>>,
297+
or one of the remotes or shards failed.
297298

298299

299300
The cross-cluster metadata can be used to determine whether any data came back from a cluster.

docs/reference/esql/esql-query-api.asciidoc

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ You can also specify a format using the `Accept` HTTP header. If you specify
6363
both this parameter and the `Accept` HTTP header, this parameter takes
6464
precedence.
6565

66+
`allow_partial_results`::
67+
(Optional, boolean) If `true`, partial results will be returned if there are shard failures, but
68+
the query can continue to execute on other clusters and shards. This defaults to the value of
69+
the cluster setting `esql.query.allow_partial_results`.
70+
6671
[discrete]
6772
[role="child_attributes"]
6873
[[esql-query-api-request-body]]
@@ -120,11 +125,17 @@ returned if `drop_null_columns` is sent with the request.
120125
(array of arrays)
121126
Values for the search results.
122127

128+
`is_partial`::
129+
(boolean)
130+
Indicates whether the response is partial. Partial responses can happen due to partial shard failures,
131+
failures in remote clusters, or if the async query was stopped by calling the <<esql-async-query-stop-api,async query stop API>>.
132+
123133
`_clusters`::
124134
(object)
125-
Metadata about clusters involved in the execution of a cross-cluster query. Only returned (1) for
126-
cross-cluster searches and (2) when `include_ccs_metadata` is sent in the body and set to `true`
127-
and (3) when `format` of the response is set to JSON (the default), CBOR, SMILE, or YAML.
135+
Metadata about clusters involved in the execution of a query. This field is present in the response in the following cases:
136+
(1) for cross-cluster searches, when `include_ccs_metadata` is sent in the body and set to `true`;
137+
(2) the result is partial (`is_partial` is `true`) and there are failures on some clusters.
138+
It is only returned if the `format` of the response is set to JSON (the default), CBOR, SMILE, or YAML.
128139
See <<ccq-cluster-details>> for more information.
129140

130141
`profile`::

0 commit comments

Comments
 (0)