diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index fac648e6ab..b79b41c8ff 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -167,6 +167,9 @@ { "$ref": "#/components/parameters/async_search.submit#wait_for_completion_timeout" }, + { + "$ref": "#/components/parameters/async_search.submit#keep_alive" + }, { "$ref": "#/components/parameters/async_search.submit#keep_on_completion" }, @@ -320,6 +323,9 @@ { "$ref": "#/components/parameters/async_search.submit#wait_for_completion_timeout" }, + { + "$ref": "#/components/parameters/async_search.submit#keep_alive" + }, { "$ref": "#/components/parameters/async_search.submit#keep_on_completion" }, @@ -97133,6 +97139,16 @@ }, "style": "form" }, + "async_search.submit#keep_alive": { + "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" + }, "async_search.submit#keep_on_completion": { "in": "query", "name": "keep_on_completion", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 1b4eec2f6b..9fdf8b32b3 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -167,6 +167,9 @@ { "$ref": "#/components/parameters/async_search.submit#wait_for_completion_timeout" }, + { + "$ref": "#/components/parameters/async_search.submit#keep_alive" + }, { "$ref": "#/components/parameters/async_search.submit#keep_on_completion" }, @@ -320,6 +323,9 @@ { "$ref": "#/components/parameters/async_search.submit#wait_for_completion_timeout" }, + { + "$ref": "#/components/parameters/async_search.submit#keep_alive" + }, { "$ref": "#/components/parameters/async_search.submit#keep_on_completion" }, @@ -57571,6 +57577,16 @@ }, "style": "form" }, + "async_search.submit#keep_alive": { + "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" + }, "async_search.submit#keep_on_completion": { "in": "query", "name": "keep_on_completion", diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 2898b6b5f9..85253cd188 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -11101,6 +11101,19 @@ } } }, + { + "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" + } + } + }, { "description": "If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`.", "name": "keep_on_completion", @@ -11627,7 +11640,7 @@ } } ], - "specLocation": "async_search/submit/AsyncSearchSubmitRequest.ts#L55-L280" + "specLocation": "async_search/submit/AsyncSearchSubmitRequest.ts#L55-L286" }, { "body": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 0077b2243f..ca5fc295d9 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -89984,6 +89984,19 @@ } } }, + { + "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" + } + } + }, { "description": "If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`.", "name": "keep_on_completion", @@ -90510,7 +90523,7 @@ } } ], - "specLocation": "async_search/submit/AsyncSearchSubmitRequest.ts#L55-L280" + "specLocation": "async_search/submit/AsyncSearchSubmitRequest.ts#L55-L286" }, { "kind": "response", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 46036b7733..c3252a1343 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -38,6 +38,7 @@ }, "async_search.submit": { "request": [ + "Request: query parameter 'keep_alive' does not exist in the json spec", "Request: query parameter 'min_compatible_shard_node' does not exist in the json spec", "interface definition _types:QueryVectorBuilder - Property text_embedding is a single-variant and must be required" ], diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 81d272a2a1..335d146847 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -6757,6 +6757,7 @@ export interface AsyncSearchStatusStatusResponseBase extends AsyncSearchAsyncSea export interface AsyncSearchSubmitRequest extends RequestBase { index?: Indices wait_for_completion_timeout?: Duration + keep_alive?: Duration keep_on_completion?: boolean allow_no_indices?: boolean allow_partial_search_results?: boolean diff --git a/specification/async_search/submit/AsyncSearchSubmitRequest.ts b/specification/async_search/submit/AsyncSearchSubmitRequest.ts index ad6f95179a..a26ae50af1 100644 --- a/specification/async_search/submit/AsyncSearchSubmitRequest.ts +++ b/specification/async_search/submit/AsyncSearchSubmitRequest.ts @@ -68,7 +68,7 @@ import { Duration } from '@_types/Time' * @doc_tag search */ // NOTE: this is a SearchRequest with: -// * 2 added parameters: wait_for_completion_timeout, keep_on_completion +// * 2 added parameters: wait_for_completion_timeout, keep_on_completion and keep_alive // * 2 removed parameters: scroll, pre_filter_shard_size export interface Request extends RequestBase { path_parts: { @@ -81,6 +81,12 @@ export interface Request extends RequestBase { * @server_default 1s */ wait_for_completion_timeout?: Duration + /** + * 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 /** * If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`. * @server_default false