From 6eefa562894a9927e56e214de97be1127bd37d2c Mon Sep 17 00:00:00 2001 From: Panagiotis Bailis Date: Wed, 20 Nov 2024 12:29:32 +0200 Subject: [PATCH] Adding allow_partial_search_results parameter to OpenPointInTime action (#3155) (cherry picked from commit db4203b0f43d40a0eab607f1b504a3f1cec751d2) --- output/openapi/elasticsearch-openapi.json | 10 ++++++++++ .../openapi/elasticsearch-serverless-openapi.json | 10 ++++++++++ output/schema/schema-serverless.json | 15 ++++++++++++++- output/schema/schema.json | 15 ++++++++++++++- output/typescript/types.ts | 1 + .../open_point_in_time/OpenPointInTimeRequest.ts | 6 ++++++ specification/_json_spec/open_point_in_time.json | 4 ++++ 7 files changed, 59 insertions(+), 2 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index cb09a06ade..b4aea93d4f 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -23761,6 +23761,16 @@ "$ref": "#/components/schemas/_types:ExpandWildcards" }, "style": "form" + }, + { + "in": "query", + "name": "allow_partial_search_results", + "description": "If `false`, creating a point in time request when a shard is missing or unavailable will throw an exception.\nIf `true`, the point in time will contain all the shards that are available at the time of the request.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "requestBody": { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 93ea1db1be..88abdf2c96 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -14586,6 +14586,16 @@ "$ref": "#/components/schemas/_types:ExpandWildcards" }, "style": "form" + }, + { + "in": "query", + "name": "allow_partial_search_results", + "description": "If `false`, creating a point in time request when a shard is missing or unavailable will throw an exception.\nIf `true`, the point in time will contain all the shards that are available at the time of the request.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "requestBody": { diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 4fb36de1b0..0bb1a69210 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -34664,9 +34664,22 @@ "namespace": "_types" } } + }, + { + "description": "If `false`, creating a point in time request when a shard is missing or unavailable will throw an exception.\nIf `true`, the point in time will contain all the shards that are available at the time of the request.", + "name": "allow_partial_search_results", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "_global/open_point_in_time/OpenPointInTimeRequest.ts#L25-L81" + "specLocation": "_global/open_point_in_time/OpenPointInTimeRequest.ts#L25-L87" }, { "body": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 7e48235871..b758f91418 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -29567,9 +29567,22 @@ "namespace": "_types" } } + }, + { + "description": "If `false`, creating a point in time request when a shard is missing or unavailable will throw an exception.\nIf `true`, the point in time will contain all the shards that are available at the time of the request.", + "name": "allow_partial_search_results", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "_global/open_point_in_time/OpenPointInTimeRequest.ts#L25-L81" + "specLocation": "_global/open_point_in_time/OpenPointInTimeRequest.ts#L25-L87" }, { "kind": "response", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 15b02bd6a7..ee0ad0b596 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -895,6 +895,7 @@ export interface OpenPointInTimeRequest extends RequestBase { preference?: string routing?: Routing expand_wildcards?: ExpandWildcards + allow_partial_search_results?: boolean body?: { index_filter?: QueryDslQueryContainer } diff --git a/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts b/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts index 8b1da5da5e..cc4b86d567 100644 --- a/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts +++ b/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts @@ -71,6 +71,12 @@ export interface Request extends RequestBase { * @server_default open */ expand_wildcards?: ExpandWildcards + /** + * If `false`, creating a point in time request when a shard is missing or unavailable will throw an exception. + * If `true`, the point in time will contain all the shards that are available at the time of the request. + * @server_default false + */ + allow_partial_search_results?: boolean } body: { /** diff --git a/specification/_json_spec/open_point_in_time.json b/specification/_json_spec/open_point_in_time.json index 34e9f4a4b6..3870c1f95f 100644 --- a/specification/_json_spec/open_point_in_time.json +++ b/specification/_json_spec/open_point_in_time.json @@ -47,6 +47,10 @@ "type": "string", "description": "Specific the time to live for the point in time", "required": true + }, + "allow_partial_search_results": { + "type": "boolean", + "description": "Specify whether to tolerate shards missing when creating the point-in-time, or otherwise throw an exception. (default: false)" } }, "body": {