From e41e3e4c55130bfa6ee5f5ef1410479935dd16bb Mon Sep 17 00:00:00 2001 From: Chris Parrinello Date: Mon, 23 Feb 2026 13:50:10 -0600 Subject: [PATCH] Add return_intermediate_results query param * Updates the Async Search Get Request query params to add a new return_intermediate_results query param. --- output/openapi/elasticsearch-openapi.json | 10 ++++++++++ .../openapi/elasticsearch-serverless-openapi.json | 10 ++++++++++ output/schema/schema.json | 14 +++++++++++++- output/typescript/types.ts | 1 + .../async_search/get/AsyncSearchGetRequest.ts | 10 ++++++++++ 5 files changed, 44 insertions(+), 1 deletion(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 6f49f333af..586a6ced2c 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -58,6 +58,16 @@ "$ref": "#/components/schemas/_types.Duration" }, "style": "form" + }, + { + "in": "query", + "name": "return_intermediate_results", + "description": "Specifies whether the response should contain intermediate results if the query is still running when the wait_for_completion_timeout\nexpires or if no wait_for_completion_timeout is specified.\nIf true and the search is still running, the search response\nwill include any hits and partial aggregations that are available.\nIf false and the search is still running, the search response will not include any hits (but possibly include\ntotal hits) nor will include any partial aggregations.\nWhen not specified, the intermediate results are returned for running queries.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "responses": { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index b63be4e0c0..c76c1a1e45 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -58,6 +58,16 @@ "$ref": "#/components/schemas/_types.Duration" }, "style": "form" + }, + { + "in": "query", + "name": "return_intermediate_results", + "description": "Specifies whether the response should contain intermediate results if the query is still running when the wait_for_completion_timeout\nexpires or if no wait_for_completion_timeout is specified.\nIf true and the search is still running, the search response\nwill include any hits and partial aggregations that are available.\nIf false and the search is still running, the search response will not include any hits (but possibly include\ntotal hits) nor will include any partial aggregations.\nWhen not specified, the intermediate results are returned for running queries.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "responses": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 9811a752c9..9885dcf46a 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -102418,9 +102418,21 @@ "namespace": "_types" } } + }, + { + "description": "Specifies whether the response should contain intermediate results if the query is still running when the wait_for_completion_timeout\nexpires or if no wait_for_completion_timeout is specified.\nIf true and the search is still running, the search response\nwill include any hits and partial aggregations that are available.\nIf false and the search is still running, the search response will not include any hits (but possibly include\ntotal hits) nor will include any partial aggregations.\nWhen not specified, the intermediate results are returned for running queries.", + "name": "return_intermediate_results", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "async_search/get/AsyncSearchGetRequest.ts#L24-L67" + "specLocation": "async_search/get/AsyncSearchGetRequest.ts#L24-L77" }, { "kind": "response", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 2dd408ae23..36d556da3f 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -7298,6 +7298,7 @@ export interface AsyncSearchGetRequest extends RequestBase { keep_alive?: Duration typed_keys?: boolean wait_for_completion_timeout?: Duration + return_intermediate_results?: boolean } export type AsyncSearchGetResponse = AsyncSearchAsyncSearchDocumentResponseBase diff --git a/specification/async_search/get/AsyncSearchGetRequest.ts b/specification/async_search/get/AsyncSearchGetRequest.ts index d1652011d0..a89da28492 100644 --- a/specification/async_search/get/AsyncSearchGetRequest.ts +++ b/specification/async_search/get/AsyncSearchGetRequest.ts @@ -63,5 +63,15 @@ export interface Request extends RequestBase { * By default no timeout is set meaning that the currently available results will be returned without any additional wait. */ wait_for_completion_timeout?: Duration + /** + * Specifies whether the response should contain intermediate results if the query is still running when the wait_for_completion_timeout + * expires or if no wait_for_completion_timeout is specified. + * If true and the search is still running, the search response + * will include any hits and partial aggregations that are available. + * If false and the search is still running, the search response will not include any hits (but possibly include + * total hits) nor will include any partial aggregations. + * When not specified, the intermediate results are returned for running queries. + */ + return_intermediate_results?: boolean } }