diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index ec0e06df55..f6f97994e6 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -8241,18 +8241,9 @@ { "$ref": "#/components/parameters/create-id" }, - { - "$ref": "#/components/parameters/create-if_primary_term" - }, - { - "$ref": "#/components/parameters/create-if_seq_no" - }, { "$ref": "#/components/parameters/create-include_source_on_error" }, - { - "$ref": "#/components/parameters/create-op_type" - }, { "$ref": "#/components/parameters/create-pipeline" }, @@ -8315,18 +8306,9 @@ { "$ref": "#/components/parameters/create-id" }, - { - "$ref": "#/components/parameters/create-if_primary_term" - }, - { - "$ref": "#/components/parameters/create-if_seq_no" - }, { "$ref": "#/components/parameters/create-include_source_on_error" }, - { - "$ref": "#/components/parameters/create-op_type" - }, { "$ref": "#/components/parameters/create-pipeline" }, @@ -10405,6 +10387,9 @@ { "$ref": "#/components/parameters/eql.search-expand_wildcards" }, + { + "$ref": "#/components/parameters/eql.search-ccs_minimize_roundtrips" + }, { "$ref": "#/components/parameters/eql.search-ignore_unavailable" }, @@ -10460,6 +10445,9 @@ { "$ref": "#/components/parameters/eql.search-expand_wildcards" }, + { + "$ref": "#/components/parameters/eql.search-ccs_minimize_roundtrips" + }, { "$ref": "#/components/parameters/eql.search-ignore_unavailable" }, @@ -80276,13 +80264,6 @@ "scheduled" ] }, - "_types.OpType": { - "type": "string", - "enum": [ - "index", - "create" - ] - }, "_types.WriteResponseBase": { "type": "object", "properties": { @@ -82942,6 +82923,13 @@ "phase" ] }, + "_types.OpType": { + "type": "string", + "enum": [ + "index", + "create" + ] + }, "indices.add_block.IndicesBlockOptions": { "type": "string", "enum": [ @@ -115278,26 +115266,6 @@ }, "style": "simple" }, - "create-if_primary_term": { - "in": "query", - "name": "if_primary_term", - "description": "Only perform the operation if the document has this primary term.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "create-if_seq_no": { - "in": "query", - "name": "if_seq_no", - "description": "Only perform the operation if the document has this sequence number.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "style": "form" - }, "create-include_source_on_error": { "in": "query", "name": "include_source_on_error", @@ -115308,16 +115276,6 @@ }, "style": "form" }, - "create-op_type": { - "in": "query", - "name": "op_type", - "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.OpType" - }, - "style": "form" - }, "create-pipeline": { "in": "query", "name": "pipeline", @@ -115443,6 +115401,7 @@ "eql.search-allow_no_indices": { "in": "query", "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", "deprecated": false, "schema": { "type": "boolean" @@ -115472,12 +115431,23 @@ "eql.search-expand_wildcards": { "in": "query", "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, + "eql.search-ccs_minimize_roundtrips": { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, "eql.search-ignore_unavailable": { "in": "query", "name": "ignore_unavailable", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 1ca471780a..b4924ae3f2 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -4138,18 +4138,9 @@ { "$ref": "#/components/parameters/create-id" }, - { - "$ref": "#/components/parameters/create-if_primary_term" - }, - { - "$ref": "#/components/parameters/create-if_seq_no" - }, { "$ref": "#/components/parameters/create-include_source_on_error" }, - { - "$ref": "#/components/parameters/create-op_type" - }, { "$ref": "#/components/parameters/create-pipeline" }, @@ -4212,18 +4203,9 @@ { "$ref": "#/components/parameters/create-id" }, - { - "$ref": "#/components/parameters/create-if_primary_term" - }, - { - "$ref": "#/components/parameters/create-if_seq_no" - }, { "$ref": "#/components/parameters/create-include_source_on_error" }, - { - "$ref": "#/components/parameters/create-op_type" - }, { "$ref": "#/components/parameters/create-pipeline" }, @@ -6055,6 +6037,9 @@ { "$ref": "#/components/parameters/eql.search-expand_wildcards" }, + { + "$ref": "#/components/parameters/eql.search-ccs_minimize_roundtrips" + }, { "$ref": "#/components/parameters/eql.search-ignore_unavailable" }, @@ -6110,6 +6095,9 @@ { "$ref": "#/components/parameters/eql.search-expand_wildcards" }, + { + "$ref": "#/components/parameters/eql.search-ccs_minimize_roundtrips" + }, { "$ref": "#/components/parameters/eql.search-ignore_unavailable" }, @@ -51689,13 +51677,6 @@ "scheduled" ] }, - "_types.OpType": { - "type": "string", - "enum": [ - "index", - "create" - ] - }, "_types.WriteResponseBase": { "type": "object", "properties": { @@ -52730,6 +52711,13 @@ "weight" ] }, + "_types.OpType": { + "type": "string", + "enum": [ + "index", + "create" + ] + }, "indices.add_block.IndicesBlockOptions": { "type": "string", "enum": [ @@ -69198,26 +69186,6 @@ }, "style": "simple" }, - "create-if_primary_term": { - "in": "query", - "name": "if_primary_term", - "description": "Only perform the operation if the document has this primary term.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "create-if_seq_no": { - "in": "query", - "name": "if_seq_no", - "description": "Only perform the operation if the document has this sequence number.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "style": "form" - }, "create-include_source_on_error": { "in": "query", "name": "include_source_on_error", @@ -69228,16 +69196,6 @@ }, "style": "form" }, - "create-op_type": { - "in": "query", - "name": "op_type", - "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.OpType" - }, - "style": "form" - }, "create-pipeline": { "in": "query", "name": "pipeline", @@ -69363,6 +69321,7 @@ "eql.search-allow_no_indices": { "in": "query", "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", "deprecated": false, "schema": { "type": "boolean" @@ -69392,12 +69351,23 @@ "eql.search-expand_wildcards": { "in": "query", "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" }, "style": "form" }, + "eql.search-ccs_minimize_roundtrips": { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, "eql.search-ignore_unavailable": { "in": "query", "name": "ignore_unavailable", diff --git a/output/schema/schema.json b/output/schema/schema.json index bb5164272c..dbc807ecfa 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -25536,34 +25536,6 @@ } ], "query": [ - { - "description": "Only perform the operation if the document has this primary term.", - "extDocId": "optimistic-concurrency", - "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/optimistic-concurrency-control.html", - "name": "if_primary_term", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - } - }, - { - "description": "Only perform the operation if the document has this sequence number.", - "extDocId": "optimistic-concurrency", - "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/optimistic-concurrency-control.html", - "name": "if_seq_no", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SequenceNumber", - "namespace": "_types" - } - } - }, { "description": "True or false if to include the document source in the error message in case of parsing errors.", "name": "include_source_on_error", @@ -25577,18 +25549,6 @@ } } }, - { - "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.", - "name": "op_type", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "OpType", - "namespace": "_types" - } - } - }, { "description": "The ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.\nIf a final pipeline is configured, it will always run regardless of the value of this parameter.", "name": "pipeline", @@ -25703,7 +25663,7 @@ } } ], - "specLocation": "_global/create/CreateRequest.ts#L35-L221" + "specLocation": "_global/create/CreateRequest.ts#L32-L199" }, { "kind": "response", @@ -135068,6 +135028,7 @@ ], "query": [ { + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", "name": "allow_no_indices", "required": false, "serverDefault": true, @@ -135106,6 +135067,7 @@ } }, { + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", "name": "expand_wildcards", "required": false, "serverDefault": "open", @@ -135117,6 +135079,19 @@ } } }, + { + "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", + "name": "ccs_minimize_roundtrips", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "description": "If true, missing or closed indices are not included in the response.", "name": "ignore_unavailable", @@ -135169,7 +135144,7 @@ } } ], - "specLocation": "eql/search/EqlSearchRequest.ts#L28-L161" + "specLocation": "eql/search/EqlSearchRequest.ts#L28-L166" }, { "kind": "response", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index e1dec5963e..fcdc20d972 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -163,24 +163,6 @@ ], "response": [] }, - "create": { - "request": [ - "Request: query parameter 'if_primary_term' does not exist in the json spec", - "Request: query parameter 'if_seq_no' does not exist in the json spec", - "Request: query parameter 'op_type' does not exist in the json spec", - "Request: query parameter 'require_alias' does not exist in the json spec", - "Request: query parameter 'require_data_stream' does not exist in the json spec" - ], - "response": [] - }, - "eql.search": { - "request": [ - "Request: query parameter 'allow_no_indices' 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" - ], - "response": [] - }, "esql.async_query_get": { "request": [ "Request: query parameter 'format' does not exist in the json spec" diff --git a/output/typescript/types.ts b/output/typescript/types.ts index ff4abd6a57..22326f598c 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -159,10 +159,7 @@ export interface CountResponse { export interface CreateRequest extends RequestBase { id: Id index: IndexName - if_primary_term?: long - if_seq_no?: SequenceNumber include_source_on_error?: boolean - op_type?: OpType pipeline?: string refresh?: Refresh require_alias?: boolean @@ -10836,6 +10833,7 @@ export interface EqlSearchRequest extends RequestBase { allow_partial_search_results?: boolean allow_partial_sequence_results?: boolean expand_wildcards?: ExpandWildcards + ccs_minimize_roundtrips?: boolean ignore_unavailable?: boolean keep_alive?: Duration keep_on_completion?: boolean diff --git a/specification/_global/create/CreateRequest.ts b/specification/_global/create/CreateRequest.ts index 35dcdcb72d..06e19ff024 100644 --- a/specification/_global/create/CreateRequest.ts +++ b/specification/_global/create/CreateRequest.ts @@ -21,15 +21,12 @@ import { RequestBase } from '@_types/Base' import { Id, IndexName, - OpType, Refresh, Routing, - SequenceNumber, VersionNumber, VersionType, WaitForActiveShards } from '@_types/common' -import { long } from '@_types/Numeric' import { Duration } from '@_types/Time' /** @@ -134,30 +131,11 @@ export interface Request extends RequestBase { index: IndexName } query_parameters: { - /** - * Only perform the operation if the document has this primary term. - * @ext_doc_id optimistic-concurrency - */ - if_primary_term?: long - /** - * Only perform the operation if the document has this sequence number. - * @ext_doc_id optimistic-concurrency - */ - if_seq_no?: SequenceNumber /** * True or false if to include the document source in the error message in case of parsing errors. * @server_default true */ include_source_on_error?: boolean - /** - * Set to `create` to only index the document if it does not already exist (put if absent). - * If a document with the specified `_id` already exists, the indexing operation will fail. - * The behavior is the same as using the `/_create` endpoint. - * If a document ID is specified, this paramater defaults to `index`. - * Otherwise, it defaults to `create`. - * If the request targets a data stream, an `op_type` of `create` is required. - */ - op_type?: OpType /** * The ID of the pipeline to use to preprocess incoming documents. * If the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request. diff --git a/specification/_json_spec/create.json b/specification/_json_spec/create.json index ffa5e0f26e..03038a9366 100644 --- a/specification/_json_spec/create.json +++ b/specification/_json_spec/create.json @@ -62,6 +62,14 @@ "include_source_on_error": { "type": "boolean", "description": "True or false if to include the document source in the error message in case of parsing errors. Defaults to true." + }, + "require_alias": { + "type": "boolean", + "description": "When true, requires destination to be an alias. Default is false" + }, + "require_data_stream": { + "type": "boolean", + "description": "When true, requires destination to be a data stream (existing or to be created). Default is false" } }, "body": { diff --git a/specification/_json_spec/eql.search.json b/specification/_json_spec/eql.search.json index 1d9831a6e8..92568e69b1 100644 --- a/specification/_json_spec/eql.search.json +++ b/specification/_json_spec/eql.search.json @@ -48,6 +48,25 @@ "type": "boolean", "description": "Control whether a sequence query should return partial results or no results at all in case of shard failures. This option has effect only if [allow_partial_search_results] is true.", "default": false + }, + "ccs_minimize_roundtrips": { + "type": "boolean", + "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", + "default": true + }, + "ignore_unavailable": { + "type": "boolean", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)" + }, + "allow_no_indices": { + "type": "boolean", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)" + }, + "expand_wildcards": { + "type": "enum", + "options": ["open", "closed", "hidden", "none", "all"], + "default": "open", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both." } }, "body": { diff --git a/specification/eql/search/EqlSearchRequest.ts b/specification/eql/search/EqlSearchRequest.ts index 3240d27584..049966f9a0 100644 --- a/specification/eql/search/EqlSearchRequest.ts +++ b/specification/eql/search/EqlSearchRequest.ts @@ -65,6 +65,11 @@ export interface Request extends RequestBase { * @server_default open */ expand_wildcards?: ExpandWildcards + /** + * Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution + * @server_default true + */ + ccs_minimize_roundtrips?: boolean /** * If true, missing or closed indices are not included in the response. * @server_default true