diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 69acf16af1..a993f7665a 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -128,6 +128,16 @@ "$ref": "#/components/schemas/_types:Id" }, "style": "simple" + }, + { + "in": "query", + "name": "keep_alive", + "description": "Specifies how long the async search needs to be available.\nOngoing async searches and any saved search results are deleted after this period.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Duration" + }, + "style": "form" } ], "responses": { @@ -223,9 +233,6 @@ { "$ref": "#/components/parameters/async_search.submit#routing" }, - { - "$ref": "#/components/parameters/async_search.submit#scroll" - }, { "$ref": "#/components/parameters/async_search.submit#search_type" }, @@ -385,9 +392,6 @@ { "$ref": "#/components/parameters/async_search.submit#routing" }, - { - "$ref": "#/components/parameters/async_search.submit#scroll" - }, { "$ref": "#/components/parameters/async_search.submit#search_type" }, @@ -92785,15 +92789,6 @@ }, "style": "form" }, - "async_search.submit#scroll": { - "in": "query", - "name": "scroll", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types:Duration" - }, - "style": "form" - }, "async_search.submit#search_type": { "in": "query", "name": "search_type", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index fe1a5545e7..d42c978569 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -128,6 +128,16 @@ "$ref": "#/components/schemas/_types:Id" }, "style": "simple" + }, + { + "in": "query", + "name": "keep_alive", + "description": "Specifies how long the async search needs to be available.\nOngoing async searches and any saved search results are deleted after this period.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Duration" + }, + "style": "form" } ], "responses": { @@ -223,9 +233,6 @@ { "$ref": "#/components/parameters/async_search.submit#routing" }, - { - "$ref": "#/components/parameters/async_search.submit#scroll" - }, { "$ref": "#/components/parameters/async_search.submit#search_type" }, @@ -385,9 +392,6 @@ { "$ref": "#/components/parameters/async_search.submit#routing" }, - { - "$ref": "#/components/parameters/async_search.submit#scroll" - }, { "$ref": "#/components/parameters/async_search.submit#search_type" }, @@ -57119,15 +57123,6 @@ }, "style": "form" }, - "async_search.submit#scroll": { - "in": "query", - "name": "scroll", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types:Duration" - }, - "style": "form" - }, "async_search.submit#search_type": { "in": "query", "name": "search_type", diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 3f649a3647..9056614862 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -10117,8 +10117,22 @@ } } ], - "query": [], - "specLocation": "async_search/status/AsyncSearchStatusRequest.ts#L23-L39" + "query": [ + { + "description": "Specifies how long the async search needs to be available.\nOngoing async searches and any saved search results are deleted after this period.", + "name": "keep_alive", + "required": false, + "serverDefault": "5d", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "async_search/status/AsyncSearchStatusRequest.ts#L24-L48" }, { "body": { @@ -10929,17 +10943,6 @@ } } }, - { - "name": "scroll", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Duration", - "namespace": "_types" - } - } - }, { "description": "Search operation type", "name": "search_type", @@ -11223,7 +11226,7 @@ } } ], - "specLocation": "async_search/submit/AsyncSearchSubmitRequest.ts#L55-L290" + "specLocation": "async_search/submit/AsyncSearchSubmitRequest.ts#L55-L291" }, { "body": { diff --git a/output/schema/schema.json b/output/schema/schema.json index bf1df8a3a5..e96717aa09 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -87470,8 +87470,22 @@ } } ], - "query": [], - "specLocation": "async_search/status/AsyncSearchStatusRequest.ts#L23-L39" + "query": [ + { + "description": "Specifies how long the async search needs to be available.\nOngoing async searches and any saved search results are deleted after this period.", + "name": "keep_alive", + "required": false, + "serverDefault": "5d", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "async_search/status/AsyncSearchStatusRequest.ts#L24-L48" }, { "kind": "response", @@ -88334,17 +88348,6 @@ } } }, - { - "name": "scroll", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Duration", - "namespace": "_types" - } - } - }, { "description": "Search operation type", "name": "search_type", @@ -88628,7 +88631,7 @@ } } ], - "specLocation": "async_search/submit/AsyncSearchSubmitRequest.ts#L55-L290" + "specLocation": "async_search/submit/AsyncSearchSubmitRequest.ts#L55-L291" }, { "kind": "response", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index b54cd02ee6..0cbd80c628 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -49,16 +49,9 @@ "type_alias definition _global.search._types:Suggest - Expected 1 generic parameters but got 0" ] }, - "async_search.status": { - "request": [ - "Request: missing json spec query parameter 'keep_alive'" - ], - "response": [] - }, "async_search.submit": { "request": [ "Request: query parameter 'min_compatible_shard_node' does not exist in the json spec", - "Request: query parameter 'scroll' does not exist in the json spec", "interface definition _types:QueryVectorBuilder - Property text_embedding is a single-variant and must be required", "type_alias definition _spec_utils:PipeSeparatedFlags / union_of / instance_of - No type definition for '_spec_utils.PipeSeparatedFlags:T'" ], diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 4948d3096f..a09c6d2f3a 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -6732,6 +6732,7 @@ export type AsyncSearchGetResponse = AsyncSearchAsyncSearch export interface AsyncSearchStatusRequest extends RequestBase { id: Id + keep_alive?: Duration } export type AsyncSearchStatusResponse = AsyncSearchStatusStatusResponseBase @@ -6767,7 +6768,6 @@ export interface AsyncSearchSubmitRequest extends RequestBase { pre_filter_shard_size?: long request_cache?: boolean routing?: Routing - scroll?: Duration search_type?: SearchType stats?: string[] stored_fields?: Fields diff --git a/specification/async_search/status/AsyncSearchStatusRequest.ts b/specification/async_search/status/AsyncSearchStatusRequest.ts index 4a8f4f7816..e8b09d88b5 100644 --- a/specification/async_search/status/AsyncSearchStatusRequest.ts +++ b/specification/async_search/status/AsyncSearchStatusRequest.ts @@ -19,6 +19,7 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { Duration } from '@_types/Time' /** * Get the async search status. @@ -36,4 +37,12 @@ export interface Request extends RequestBase { /** A unique identifier for the async search. */ id: Id } + query_parameters: { + /** + * Specifies how long the async search needs to be available. + * Ongoing async searches and any saved search results are deleted after this period. + * @server_default 5d + */ + keep_alive?: Duration + } } diff --git a/specification/async_search/submit/AsyncSearchSubmitRequest.ts b/specification/async_search/submit/AsyncSearchSubmitRequest.ts index 1bc571dc43..28798b2ee5 100644 --- a/specification/async_search/submit/AsyncSearchSubmitRequest.ts +++ b/specification/async_search/submit/AsyncSearchSubmitRequest.ts @@ -67,7 +67,9 @@ import { Duration } from '@_types/Time' * @doc_id async-search * @doc_tag search */ -// NOTE: this is a SearchRequest with 3 added parameters: wait_for_completion_timeout, keep_on_completion and keep_alive +// NOTE: this is a SearchRequest with: +// * 3 added parameters: wait_for_completion_timeout, keep_on_completion and keep_alive +// * 1 removed parameters: scroll export interface Request extends RequestBase { path_parts: { index?: Indices @@ -124,7 +126,6 @@ export interface Request extends RequestBase { /** @server_default true */ request_cache?: boolean routing?: Routing - scroll?: Duration search_type?: SearchType stats?: string[] stored_fields?: Fields