From 6d5b279445fe351948fa4d1954c86efe99b0b531 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 29 Apr 2025 15:33:25 -0600 Subject: [PATCH] Document allow_partial_results and esql.query.allow_partial_results --- output/openapi/elasticsearch-openapi.json | 4 ++-- output/openapi/elasticsearch-serverless-openapi.json | 2 +- output/schema/schema-serverless.json | 6 +++--- output/schema/schema.json | 12 ++++++------ specification/esql/async_query/AsyncQueryRequest.ts | 5 ++++- specification/esql/query/QueryRequest.ts | 5 ++++- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 01154de853..cdc0adcbd0 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -9449,7 +9449,7 @@ { "in": "query", "name": "allow_partial_results", - "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.", + "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.\nIf `false`, the query will fail if there are any failures.\n\nTo override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`.", "deprecated": false, "schema": { "type": "boolean" @@ -9899,7 +9899,7 @@ { "in": "query", "name": "allow_partial_results", - "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.", + "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.\nIf `false`, the query will fail if there are any failures.\n\nTo override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`.", "deprecated": false, "schema": { "type": "boolean" diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 8d45e285d7..bea595138f 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -5623,7 +5623,7 @@ { "in": "query", "name": "allow_partial_results", - "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.", + "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.\nIf `false`, the query will fail if there are any failures.\n\nTo override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`.", "deprecated": false, "schema": { "type": "boolean" diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 37983f2ff6..6139e9de68 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -20392,10 +20392,10 @@ } }, { - "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.", + "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.\nIf `false`, the query will fail if there are any failures.\n\nTo override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`.", "name": "allow_partial_results", "required": false, - "serverDefault": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -20405,7 +20405,7 @@ } } ], - "specLocation": "esql/query/QueryRequest.ts#L27-L110" + "specLocation": "esql/query/QueryRequest.ts#L27-L113" }, { "body": { diff --git a/output/schema/schema.json b/output/schema/schema.json index fce503c391..c5db476543 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -127198,10 +127198,10 @@ "path": [], "query": [ { - "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.", + "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.\nIf `false`, the query will fail if there are any failures.\n\nTo override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`.", "name": "allow_partial_results", "required": false, - "serverDefault": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -127287,7 +127287,7 @@ } } ], - "specLocation": "esql/async_query/AsyncQueryRequest.ts#L28-L138" + "specLocation": "esql/async_query/AsyncQueryRequest.ts#L28-L141" }, { "kind": "response", @@ -127967,10 +127967,10 @@ } }, { - "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.", + "description": "If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards.\nIf `false`, the query will fail if there are any failures.\n\nTo override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`.", "name": "allow_partial_results", "required": false, - "serverDefault": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -127980,7 +127980,7 @@ } } ], - "specLocation": "esql/query/QueryRequest.ts#L27-L110" + "specLocation": "esql/query/QueryRequest.ts#L27-L113" }, { "kind": "response", diff --git a/specification/esql/async_query/AsyncQueryRequest.ts b/specification/esql/async_query/AsyncQueryRequest.ts index a2c845da75..ccd3ae72e3 100644 --- a/specification/esql/async_query/AsyncQueryRequest.ts +++ b/specification/esql/async_query/AsyncQueryRequest.ts @@ -40,7 +40,10 @@ export interface Request extends RequestBase { query_parameters: { /** * If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. - * @server_default false + * If `false`, the query will fail if there are any failures. + * + * To override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`. + * @server_default true */ allow_partial_results?: boolean /** diff --git a/specification/esql/query/QueryRequest.ts b/specification/esql/query/QueryRequest.ts index 9106776da5..9b0168f506 100644 --- a/specification/esql/query/QueryRequest.ts +++ b/specification/esql/query/QueryRequest.ts @@ -57,7 +57,10 @@ export interface Request extends RequestBase { drop_null_columns?: boolean /** * If `true`, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. - * @server_default false + * If `false`, the query will fail if there are any failures. + * + * To override the default behavior, you can set the `esql.query.allow_partial_results` cluster setting to `false`. + * @server_default true */ allow_partial_results?: boolean }