diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 51dd1e2a9d..38936c33e7 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -8244,6 +8244,12 @@ { "$ref": "#/components/parameters/eql.search#allow_no_indices" }, + { + "$ref": "#/components/parameters/eql.search#allow_partial_search_results" + }, + { + "$ref": "#/components/parameters/eql.search#allow_partial_sequence_results" + }, { "$ref": "#/components/parameters/eql.search#expand_wildcards" }, @@ -8287,6 +8293,12 @@ { "$ref": "#/components/parameters/eql.search#allow_no_indices" }, + { + "$ref": "#/components/parameters/eql.search#allow_partial_search_results" + }, + { + "$ref": "#/components/parameters/eql.search#allow_partial_sequence_results" + }, { "$ref": "#/components/parameters/eql.search#expand_wildcards" }, @@ -66359,6 +66371,13 @@ }, "hits": { "$ref": "#/components/schemas/eql._types:EqlHits" + }, + "shard_failures": { + "description": "Contains information about shard failures (if any), in case allow_partial_search_results=true", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:ShardFailure" + } } }, "required": [ @@ -96479,6 +96498,26 @@ }, "style": "form" }, + "eql.search#allow_partial_search_results": { + "in": "query", + "name": "allow_partial_search_results", + "description": "If true, returns partial results if there are shard failures. If false, returns an error with no partial results.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + "eql.search#allow_partial_sequence_results": { + "in": "query", + "name": "allow_partial_sequence_results", + "description": "If true, sequence queries will return partial results in case of shard failures. If false, they will return no results at all.\nThis flag has effect only if allow_partial_search_results is true.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, "eql.search#expand_wildcards": { "in": "query", "name": "expand_wildcards", @@ -104316,6 +104355,12 @@ "wait_for_completion_timeout": { "$ref": "#/components/schemas/_types:Duration" }, + "allow_partial_search_results": { + "type": "boolean" + }, + "allow_partial_sequence_results": { + "type": "boolean" + }, "size": { "$ref": "#/components/schemas/_types:uint" }, diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 53b10bd877..1badb71eb5 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -5014,6 +5014,12 @@ { "$ref": "#/components/parameters/eql.search#allow_no_indices" }, + { + "$ref": "#/components/parameters/eql.search#allow_partial_search_results" + }, + { + "$ref": "#/components/parameters/eql.search#allow_partial_sequence_results" + }, { "$ref": "#/components/parameters/eql.search#expand_wildcards" }, @@ -5057,6 +5063,12 @@ { "$ref": "#/components/parameters/eql.search#allow_no_indices" }, + { + "$ref": "#/components/parameters/eql.search#allow_partial_search_results" + }, + { + "$ref": "#/components/parameters/eql.search#allow_partial_sequence_results" + }, { "$ref": "#/components/parameters/eql.search#expand_wildcards" }, @@ -44475,6 +44487,13 @@ }, "hits": { "$ref": "#/components/schemas/eql._types:EqlHits" + }, + "shard_failures": { + "description": "Contains information about shard failures (if any), in case allow_partial_search_results=true", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:ShardFailure" + } } }, "required": [ @@ -58702,6 +58721,26 @@ }, "style": "form" }, + "eql.search#allow_partial_search_results": { + "in": "query", + "name": "allow_partial_search_results", + "description": "If true, returns partial results if there are shard failures. If false, returns an error with no partial results.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + "eql.search#allow_partial_sequence_results": { + "in": "query", + "name": "allow_partial_sequence_results", + "description": "If true, sequence queries will return partial results in case of shard failures. If false, they will return no results at all.\nThis flag has effect only if allow_partial_search_results is true.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, "eql.search#expand_wildcards": { "in": "query", "name": "expand_wildcards", @@ -62853,6 +62892,12 @@ "wait_for_completion_timeout": { "$ref": "#/components/schemas/_types:Duration" }, + "allow_partial_search_results": { + "type": "boolean" + }, + "allow_partial_sequence_results": { + "type": "boolean" + }, "size": { "$ref": "#/components/schemas/_types:uint" }, diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 5080ca0016..99608360b2 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -17534,6 +17534,28 @@ } } }, + { + "name": "allow_partial_search_results", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "allow_partial_sequence_results", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "description": "For basic queries, the maximum number of matching events to return. Defaults to 10", "docId": "eql-basic-syntax", @@ -17645,6 +17667,32 @@ } } }, + { + "description": "If true, returns partial results if there are shard failures. If false, returns an error with no partial results.", + "name": "allow_partial_search_results", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "If true, sequence queries will return partial results in case of shard failures. If false, they will return no results at all.\nThis flag has effect only if allow_partial_search_results is true.", + "name": "allow_partial_sequence_results", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "name": "expand_wildcards", "required": false, @@ -17709,7 +17757,7 @@ } } ], - "specLocation": "eql/search/EqlSearchRequest.ts#L28-L122" + "specLocation": "eql/search/EqlSearchRequest.ts#L28-L135" }, { "body": { @@ -117854,9 +117902,24 @@ "namespace": "eql._types" } } + }, + { + "description": "Contains information about shard failures (if any), in case allow_partial_search_results=true", + "name": "shard_failures", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "ShardFailure", + "namespace": "_types" + } + } + } } ], - "specLocation": "eql/_types/EqlSearchResponseBase.ts#L24-L49" + "specLocation": "eql/_types/EqlSearchResponseBase.ts#L25-L54" }, { "generics": [ diff --git a/output/schema/schema.json b/output/schema/schema.json index 2e418b2b45..1343674085 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -118208,9 +118208,24 @@ "namespace": "eql._types" } } + }, + { + "description": "Contains information about shard failures (if any), in case allow_partial_search_results=true", + "name": "shard_failures", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "ShardFailure", + "namespace": "_types" + } + } + } } ], - "specLocation": "eql/_types/EqlSearchResponseBase.ts#L24-L49" + "specLocation": "eql/_types/EqlSearchResponseBase.ts#L25-L54" }, { "kind": "interface", @@ -118784,6 +118799,28 @@ } } }, + { + "name": "allow_partial_search_results", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "allow_partial_sequence_results", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "description": "For basic queries, the maximum number of matching events to return. Defaults to 10", "docId": "eql-basic-syntax", @@ -118894,6 +118931,32 @@ } } }, + { + "description": "If true, returns partial results if there are shard failures. If false, returns an error with no partial results.", + "name": "allow_partial_search_results", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "If true, sequence queries will return partial results in case of shard failures. If false, they will return no results at all.\nThis flag has effect only if allow_partial_search_results is true.", + "name": "allow_partial_sequence_results", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "name": "expand_wildcards", "required": false, @@ -118958,7 +119021,7 @@ } } ], - "specLocation": "eql/search/EqlSearchRequest.ts#L28-L122" + "specLocation": "eql/search/EqlSearchRequest.ts#L28-L135" }, { "kind": "response", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 4b30c5e771..ce971775f8 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -394,6 +394,8 @@ "eql.search": { "request": [ "Request: query parameter 'allow_no_indices' does not exist in the json spec", + "Request: query parameter 'allow_partial_search_results' does not exist in the json spec", + "Request: query parameter 'allow_partial_sequence_results' does not exist in the json spec", "Request: query parameter 'expand_wildcards' does not exist in the json spec", "Request: query parameter 'ignore_unavailable' does not exist in the json spec" ], diff --git a/output/typescript/types.ts b/output/typescript/types.ts index e7b7d9c566..b0a6acdc17 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10351,6 +10351,7 @@ export interface EqlEqlSearchResponseBase { took?: DurationValue timed_out?: boolean hits: EqlEqlHits + shard_failures?: ShardFailure[] } export interface EqlHitsEvent { @@ -10396,6 +10397,8 @@ export interface EqlGetStatusResponse { export interface EqlSearchRequest extends RequestBase { index: Indices allow_no_indices?: boolean + allow_partial_search_results?: boolean + allow_partial_sequence_results?: boolean expand_wildcards?: ExpandWildcards ignore_unavailable?: boolean keep_alive?: Duration @@ -10412,6 +10415,8 @@ export interface EqlSearchRequest extends RequestBase { keep_alive?: Duration keep_on_completion?: boolean wait_for_completion_timeout?: Duration + allow_partial_search_results?: boolean + allow_partial_sequence_results?: boolean size?: uint fields?: QueryDslFieldAndFormat | Field | (QueryDslFieldAndFormat | Field)[] result_position?: EqlSearchResultPosition diff --git a/package-lock.json b/package-lock.json index eb5922e739..88470238cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "elasticsearch-specification", + "name": "backport-8.x", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/specification/eql/_types/EqlSearchResponseBase.ts b/specification/eql/_types/EqlSearchResponseBase.ts index f296ffd6bf..6789a5471d 100644 --- a/specification/eql/_types/EqlSearchResponseBase.ts +++ b/specification/eql/_types/EqlSearchResponseBase.ts @@ -18,6 +18,7 @@ */ import { Id } from '@_types/common' +import { ShardFailure } from '@_types/Errors' import { DurationValue, UnitMillis } from '@_types/Time' import { EqlHits } from './EqlHits' @@ -46,4 +47,8 @@ export class EqlSearchResponseBase { * Contains matching events and sequences. Also contains related metadata. */ hits: EqlHits + /** + * Contains information about shard failures (if any), in case allow_partial_search_results=true + */ + shard_failures?: ShardFailure[] } diff --git a/specification/eql/search/EqlSearchRequest.ts b/specification/eql/search/EqlSearchRequest.ts index 87c5c3293f..e3a6c7c050 100644 --- a/specification/eql/search/EqlSearchRequest.ts +++ b/specification/eql/search/EqlSearchRequest.ts @@ -43,6 +43,17 @@ export interface Request extends RequestBase { * @server_default true */ allow_no_indices?: boolean + /** + * If true, returns partial results if there are shard failures. If false, returns an error with no partial results. + * @server_default false + */ + allow_partial_search_results?: boolean + /** + * If true, sequence queries will return partial results in case of shard failures. If false, they will return no results at all. + * This flag has effect only if allow_partial_search_results is true. + * @server_default false + */ + allow_partial_sequence_results?: boolean /** * @server_default open */ @@ -100,6 +111,8 @@ export interface Request extends RequestBase { keep_alive?: Duration keep_on_completion?: boolean wait_for_completion_timeout?: Duration + allow_partial_search_results?: boolean + allow_partial_sequence_results?: boolean /** * For basic queries, the maximum number of matching events to return. Defaults to 10 * @doc_id eql-basic-syntax