diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 43a46ee1a0..c71cc0c8eb 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -93915,6 +93915,13 @@ "preference": { "type": "string" }, + "project_routing": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ProjectRouting" + } + ] + }, "request_cache": { "type": "boolean" }, @@ -93943,6 +93950,9 @@ } } }, + "_types.ProjectRouting": { + "type": "string" + }, "_global.msearch.ResponseItem": { "oneOf": [ { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 5d9b9cf445..264a16ddd4 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -76789,6 +76789,13 @@ "preference": { "type": "string" }, + "project_routing": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.ProjectRouting" + } + ] + }, "request_cache": { "type": "boolean" }, @@ -76817,6 +76824,9 @@ } } }, + "_types.ProjectRouting": { + "type": "string" + }, "_global.msearch.MultiSearchResult": { "type": "object", "properties": { diff --git a/output/schema/schema.json b/output/schema/schema.json index cddcc91637..3761f9a74d 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -26358,6 +26358,25 @@ } } }, + { + "availability": { + "serverless": { + "featureFlag": "serverless.cross_project.enabled", + "stability": "stable", + "visibility": "feature_flag" + } + }, + "description": "Specifies a subset of projects to target for the search using project\nmetadata tags in a subset of Lucene query syntax.\nAllowed Lucene queries: the _alias tag and a single value (possibly wildcarded).\nExamples:\n _alias:my-project\n _alias:_origin\n _alias:*pr*\nSupported in serverless only.", + "name": "project_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ProjectRouting", + "namespace": "_types" + } + } + }, { "description": "A custom value used to route operations to a specific shard.", "name": "routing", @@ -26395,7 +26414,7 @@ } } ], - "specLocation": "_global/count/CountRequest.ts#L26-L154" + "specLocation": "_global/count/CountRequest.ts#L31-L171" }, { "kind": "response", @@ -29199,9 +29218,28 @@ "namespace": "_builtins" } } + }, + { + "availability": { + "serverless": { + "featureFlag": "serverless.cross_project.enabled", + "stability": "stable", + "visibility": "feature_flag" + } + }, + "description": "Specifies a subset of projects to target for the field-caps query using project\nmetadata tags in a subset of Lucene query syntax.\nAllowed Lucene queries: the _alias tag and a single value (possibly wildcarded).\nExamples:\n _alias:my-project\n _alias:_origin\n _alias:*pr*\nSupported in serverless only.", + "name": "project_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ProjectRouting", + "namespace": "_types" + } + } } ], - "specLocation": "_global/field_caps/FieldCapabilitiesRequest.ts#L25-L130" + "specLocation": "_global/field_caps/FieldCapabilitiesRequest.ts#L30-L147" }, { "kind": "response", @@ -32989,7 +33027,7 @@ } } ], - "specLocation": "_global/msearch/types.ts#L58-L61" + "specLocation": "_global/msearch/types.ts#L65-L68" }, { "kind": "interface", @@ -33039,7 +33077,7 @@ } } ], - "specLocation": "_global/msearch/types.ts#L48-L51" + "specLocation": "_global/msearch/types.ts#L55-L58" }, { "kind": "interface", @@ -33104,6 +33142,17 @@ } } }, + { + "name": "project_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ProjectRouting", + "namespace": "_types" + } + } + }, { "name": "request_cache", "required": false, @@ -33171,7 +33220,7 @@ } } ], - "specLocation": "_global/msearch/types.ts#L31-L46" + "specLocation": "_global/msearch/types.ts#L37-L53" }, { "kind": "request", @@ -33374,6 +33423,25 @@ } } }, + { + "availability": { + "serverless": { + "featureFlag": "serverless.cross_project.enabled", + "stability": "stable", + "visibility": "feature_flag" + } + }, + "description": "Specifies a subset of projects to target for a search using project metadata\ntags in a subset Lucene syntax. Allowed Lucene queries: the _alias tag\nand a single value (possible wildcarded). Examples:\n _alias:my-project\n _alias:_origin\n _alias:*pr*\nSupported in serverless only.", + "name": "project_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ProjectRouting", + "namespace": "_types" + } + } + }, { "description": "If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.", "name": "rest_total_hits_as_int", @@ -33424,7 +33492,7 @@ } } ], - "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L140" + "specLocation": "_global/msearch/MultiSearchRequest.ts#L31-L157" }, { "kind": "type_alias", @@ -33436,7 +33504,7 @@ "name": "RequestItem", "namespace": "_global.msearch" }, - "specLocation": "_global/msearch/types.ts#L26-L29", + "specLocation": "_global/msearch/types.ts#L32-L35", "type": { "kind": "union_of", "items": [ @@ -33507,7 +33575,7 @@ "name": "ResponseItem", "namespace": "_global.msearch" }, - "specLocation": "_global/msearch/types.ts#L53-L56", + "specLocation": "_global/msearch/types.ts#L60-L63", "type": { "kind": "union_of", "items": [ @@ -33636,6 +33704,25 @@ } } }, + { + "availability": { + "serverless": { + "featureFlag": "serverless.cross_project.enabled", + "stability": "stable", + "visibility": "feature_flag" + } + }, + "description": "Specifies a subset of projects to target for the search using project\nmetadata tags in a subset of Lucene query syntax.\nAllowed Lucene queries: the _alias tag and a single value (possibly wildcarded).\nExamples:\n _alias:my-project\n _alias:_origin\n _alias:*pr*\nSupported in serverless only.", + "name": "project_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ProjectRouting", + "namespace": "_types" + } + } + }, { "description": "The type of the search operation.", "name": "search_type", @@ -33675,7 +33762,7 @@ } } ], - "specLocation": "_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L116" + "specLocation": "_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L128" }, { "kind": "type_alias", @@ -34535,6 +34622,25 @@ } } }, + { + "availability": { + "serverless": { + "featureFlag": "serverless.cross_project.enabled", + "stability": "stable", + "visibility": "feature_flag" + } + }, + "description": "Specifies a subset of projects to target for the PIT request using project\nmetadata tags in a subset of Lucene query syntax.\nAllowed Lucene queries: the _alias tag and a single value (possibly wildcarded).\nExamples:\n _alias:my-project\n _alias:_origin\n _alias:*pr*\nSupported in serverless only.", + "name": "project_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ProjectRouting", + "namespace": "_types" + } + } + }, { "description": "A custom value that is used to route operations to a specific shard.", "name": "routing", @@ -34587,7 +34693,7 @@ } } ], - "specLocation": "_global/open_point_in_time/OpenPointInTimeRequest.ts#L26-L127" + "specLocation": "_global/open_point_in_time/OpenPointInTimeRequest.ts#L31-L144" }, { "kind": "response", @@ -38757,7 +38863,7 @@ "visibility": "feature_flag" } }, - "description": "Specifies a subset of projects to target for a search using project metadata\ntags in a subset Lucene syntax. Allowed Lucene queries: the _alias tag\nand a single value (possible wildcarded). Examples:\n _alias:my-project\n _alias:_origin\n _alias:*pr*\nSupported in serverless only.", + "description": "Specifies a subset of projects to target for the search using project\nmetadata tags in a subset of Lucene query syntax.\nAllowed Lucene queries: the _alias tag and a single value (possibly wildcarded).\nExamples:\n _alias:my-project\n _alias:_origin\n _alias:*pr*\nSupported in serverless only.", "name": "project_routing", "required": false, "type": { @@ -39147,7 +39253,7 @@ } } ], - "specLocation": "_global/search/SearchRequest.ts#L54-L607" + "specLocation": "_global/search/SearchRequest.ts#L54-L608" }, { "kind": "response", @@ -46010,6 +46116,25 @@ } } }, + { + "availability": { + "serverless": { + "featureFlag": "serverless.cross_project.enabled", + "stability": "stable", + "visibility": "feature_flag" + } + }, + "description": "Specifies a subset of projects to target for the search using project\nmetadata tags in a subset of Lucene query syntax.\nAllowed Lucene queries: the _alias tag and a single value (possibly wildcarded).\nExamples:\n _alias:my-project\n _alias:_origin\n _alias:*pr*\nSupported in serverless only.", + "name": "project_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ProjectRouting", + "namespace": "_types" + } + } + }, { "description": "Maximum number of features to return in the hits layer. Accepts 0-10000.\nIf 0, results don't include the hits layer.", "name": "size", @@ -46049,7 +46174,7 @@ } } ], - "specLocation": "_global/search_mvt/SearchMvtRequest.ts#L33-L334" + "specLocation": "_global/search_mvt/SearchMvtRequest.ts#L33-L346" }, { "kind": "response", @@ -46785,6 +46910,25 @@ } } }, + { + "availability": { + "serverless": { + "featureFlag": "serverless.cross_project.enabled", + "stability": "stable", + "visibility": "feature_flag" + } + }, + "description": "Specifies a subset of projects to target for the search using project\nmetadata tags in a subset of Lucene query syntax.\nAllowed Lucene queries: the _alias tag and a single value (possibly wildcarded).\nExamples:\n _alias:my-project\n _alias:_origin\n _alias:*pr*\nSupported in serverless only.", + "name": "project_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ProjectRouting", + "namespace": "_types" + } + } + }, { "description": "A custom value used to route operations to a specific shard.", "name": "routing", @@ -46854,7 +46998,7 @@ } } ], - "specLocation": "_global/search_template/SearchTemplateRequest.ts#L33-L153" + "specLocation": "_global/search_template/SearchTemplateRequest.ts#L34-L166" }, { "kind": "response", @@ -98631,7 +98775,7 @@ "visibility": "feature_flag" } }, - "description": "Specifies a subset of projects to target for a search using project metadata\ntags in a subset Lucene syntax. Allowed Lucene queries: the _alias tag\nand a single value (possible wildcarded). Examples:\n _alias:my-project\n _alias:_origin\n _alias:*pr*\nSupported in serverless only.", + "description": "Specifies a subset of projects to target for the search using project\nmetadata tags in a subset of Lucene query syntax.\nAllowed Lucene queries: the _alias tag and a single value (possibly wildcarded).\nExamples:\n _alias:my-project\n _alias:_origin\n _alias:*pr*\nSupported in serverless only.", "name": "project_routing", "required": false, "type": { @@ -98950,7 +99094,7 @@ } } ], - "specLocation": "async_search/submit/AsyncSearchSubmitRequest.ts#L55-L306" + "specLocation": "async_search/submit/AsyncSearchSubmitRequest.ts#L55-L307" }, { "kind": "response", @@ -106140,6 +106284,25 @@ } } }, + { + "availability": { + "serverless": { + "featureFlag": "serverless.cross_project.enabled", + "stability": "stable", + "visibility": "feature_flag" + } + }, + "description": "Specifies a subset of projects to target for the search using project\nmetadata tags in a subset of Lucene query syntax.\nAllowed Lucene queries: the _alias tag and a single value (possibly wildcarded).\nExamples:\n _alias:my-project\n _alias:_origin\n _alias:*pr*\nSupported in serverless only.", + "name": "project_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ProjectRouting", + "namespace": "_types" + } + } + }, { "description": "List of columns that determine how the table should be sorted.\nSorting defaults to ascending and can be changed by setting `:asc`\nor `:desc` as a suffix to the column name.", "name": "s", @@ -106153,7 +106316,7 @@ } } ], - "specLocation": "cat/count/CatCountRequest.ts#L23-L68" + "specLocation": "cat/count/CatCountRequest.ts#L23-L80" }, { "kind": "response", @@ -138934,6 +139097,25 @@ } } }, + { + "availability": { + "serverless": { + "featureFlag": "serverless.cross_project.enabled", + "stability": "stable", + "visibility": "feature_flag" + } + }, + "description": "Specifies a subset of projects to target for the search using project\nmetadata tags in a subset of Lucene query syntax.\nAllowed Lucene queries: the _alias tag and a single value (possibly wildcarded).\nExamples:\n _alias:my-project\n _alias:_origin\n _alias:*pr*\nSupported in serverless only.", + "name": "project_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ProjectRouting", + "namespace": "_types" + } + } + }, { "description": "Timeout duration to wait for the request to finish. Defaults to no timeout, meaning the request waits for complete search results.", "name": "wait_for_completion_timeout", @@ -138947,7 +139129,7 @@ } } ], - "specLocation": "eql/search/EqlSearchRequest.ts#L28-L166" + "specLocation": "eql/search/EqlSearchRequest.ts#L28-L178" }, { "kind": "response", @@ -164004,9 +164186,28 @@ } ] } + }, + { + "availability": { + "serverless": { + "featureFlag": "serverless.cross_project.enabled", + "stability": "stable", + "visibility": "feature_flag" + } + }, + "description": "Specifies a subset of projects to target using project\nmetadata tags in a subset of Lucene query syntax.\nAllowed Lucene queries: the _alias tag and a single value (possibly wildcarded).\nExamples:\n _alias:my-project\n _alias:_origin\n _alias:*pr*\nSupported in serverless only.", + "name": "project_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ProjectRouting", + "namespace": "_types" + } + } } ], - "specLocation": "indices/resolve_index/ResolveIndexRequest.ts#L24-L75" + "specLocation": "indices/resolve_index/ResolveIndexRequest.ts#L24-L87" }, { "kind": "interface", @@ -257482,9 +257683,28 @@ "namespace": "sql.query" } } + }, + { + "availability": { + "serverless": { + "featureFlag": "serverless.cross_project.enabled", + "stability": "stable", + "visibility": "feature_flag" + } + }, + "description": "Specifies a subset of projects to target for the search using project\nmetadata tags in a subset of Lucene query syntax.\nAllowed Lucene queries: the _alias tag and a single value (possibly wildcarded).\nExamples:\n _alias:my-project\n _alias:_origin\n _alias:*pr*\nSupported in serverless only.", + "name": "project_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ProjectRouting", + "namespace": "_types" + } + } } ], - "specLocation": "sql/query/QuerySqlRequest.ts#L27-L151" + "specLocation": "sql/query/QuerySqlRequest.ts#L28-L164" }, { "kind": "response", @@ -257606,7 +257826,7 @@ "name": "SqlFormat", "namespace": "sql.query" }, - "specLocation": "sql/query/QuerySqlRequest.ts#L153-L161" + "specLocation": "sql/query/QuerySqlRequest.ts#L166-L174" }, { "kind": "request", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 34717a8197..99ea72ecb7 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -1,5 +1,53 @@ { "endpointErrors": { + "cat.count": { + "request": [ + "Request: query parameter 'project_routing' does not exist in the json spec" + ], + "response": [] + }, + "count": { + "request": [ + "Request: query parameter 'project_routing' does not exist in the json spec" + ], + "response": [] + }, + "eql.search": { + "request": [ + "Request: query parameter 'project_routing' does not exist in the json spec" + ], + "response": [] + }, + "msearch_template": { + "request": [ + "Request: query parameter 'project_routing' does not exist in the json spec" + ], + "response": [] + }, + "open_point_in_time": { + "request": [ + "Request: query parameter 'project_routing' does not exist in the json spec" + ], + "response": [] + }, + "search_mvt": { + "request": [ + "Request: query parameter 'project_routing' does not exist in the json spec" + ], + "response": [] + }, + "search_template": { + "request": [ + "Request: query parameter 'project_routing' does not exist in the json spec" + ], + "response": [] + }, + "sql.query": { + "request": [ + "Request: query parameter 'project_routing' does not exist in the json spec" + ], + "response": [] + }, "streams.status": { "request": [ "Request: query parameter 'master_timeout' does not exist in the json spec", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 1a46d6f8f0..9c90d91852 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -143,6 +143,7 @@ export interface CountRequest extends RequestBase { lenient?: boolean min_score?: double preference?: string + project_routing?: ProjectRouting routing?: Routing terminate_after?: long q?: string @@ -360,6 +361,7 @@ export interface FieldCapsRequest extends RequestBase { filters?: string types?: string[] include_empty_fields?: boolean + project_routing?: ProjectRouting body?: { fields?: Fields index_filter?: QueryDslQueryContainer @@ -742,6 +744,7 @@ export interface MsearchMultisearchHeader { ignore_unavailable?: boolean index?: Indices preference?: string + project_routing?: ProjectRouting request_cache?: boolean routing?: Routing search_type?: SearchType @@ -761,6 +764,7 @@ export interface MsearchRequest extends RequestBase { max_concurrent_searches?: integer max_concurrent_shard_requests?: integer pre_filter_shard_size?: long + project_routing?: ProjectRouting rest_total_hits_as_int?: boolean routing?: Routing search_type?: SearchType @@ -778,6 +782,7 @@ export interface MsearchTemplateRequest extends RequestBase { index?: Indices ccs_minimize_roundtrips?: boolean max_concurrent_searches?: long + project_routing?: ProjectRouting search_type?: SearchType rest_total_hits_as_int?: boolean typed_keys?: boolean @@ -851,6 +856,7 @@ export interface OpenPointInTimeRequest extends RequestBase { keep_alive: Duration ignore_unavailable?: boolean preference?: string + project_routing?: ProjectRouting routing?: Routing expand_wildcards?: ExpandWildcards allow_partial_search_results?: boolean @@ -1857,6 +1863,7 @@ export interface SearchMvtRequest extends RequestBase { grid_agg?: SearchMvtGridAggregationType grid_precision?: integer grid_type?: SearchMvtGridType + project_routing?: ProjectRouting size?: integer track_total_hits?: SearchTrackHits with_labels?: boolean @@ -1932,6 +1939,7 @@ export interface SearchTemplateRequest extends RequestBase { ignore_unavailable?: boolean preference?: string profile?: boolean + project_routing?: ProjectRouting routing?: Routing scroll?: Duration search_type?: SearchType @@ -7402,6 +7410,7 @@ export interface CatCountCountRecord { export interface CatCountRequest extends CatCatRequestBase { index?: Indices h?: CatCatCountColumns + project_routing?: ProjectRouting s?: Names } @@ -10996,6 +11005,7 @@ export interface EqlSearchRequest extends RequestBase { ignore_unavailable?: boolean keep_alive?: Duration keep_on_completion?: boolean + project_routing?: ProjectRouting wait_for_completion_timeout?: Duration body?: { query: string @@ -13307,6 +13317,7 @@ export interface IndicesResolveIndexRequest extends RequestBase { ignore_unavailable?: boolean allow_no_indices?: boolean mode?: IndicesIndexMode | IndicesIndexMode[] + project_routing?: ProjectRouting } export interface IndicesResolveIndexResolveIndexAliasItem { @@ -21944,6 +21955,7 @@ export interface SqlGetAsyncStatusResponse { export interface SqlQueryRequest extends RequestBase { format?: SqlQuerySqlFormat + project_routing?: ProjectRouting body?: { allow_partial_search_results?: boolean catalog?: string diff --git a/specification/_global/count/CountRequest.ts b/specification/_global/count/CountRequest.ts index af4202f271..894e9912f3 100644 --- a/specification/_global/count/CountRequest.ts +++ b/specification/_global/count/CountRequest.ts @@ -18,7 +18,12 @@ */ import { RequestBase } from '@_types/Base' -import { ExpandWildcards, Indices, Routing } from '@_types/common' +import { + ExpandWildcards, + Indices, + ProjectRouting, + Routing +} from '@_types/common' import { double, long } from '@_types/Numeric' import { QueryContainer } from '@_types/query_dsl/abstractions' import { Operator } from '@_types/query_dsl/Operator' @@ -124,6 +129,18 @@ export interface Request extends RequestBase { * By default, it is random. */ preference?: string + /** + * Specifies a subset of projects to target for the search using project + * metadata tags in a subset of Lucene query syntax. + * Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). + * Examples: + * _alias:my-project + * _alias:_origin + * _alias:*pr* + * Supported in serverless only. + * @availability serverless stability=stable visibility=feature_flag feature_flag=serverless.cross_project.enabled + */ + project_routing?: ProjectRouting /** * A custom value used to route operations to a specific shard. */ diff --git a/specification/_global/field_caps/FieldCapabilitiesRequest.ts b/specification/_global/field_caps/FieldCapabilitiesRequest.ts index 315c1b66f9..d1a24c0e6d 100644 --- a/specification/_global/field_caps/FieldCapabilitiesRequest.ts +++ b/specification/_global/field_caps/FieldCapabilitiesRequest.ts @@ -18,7 +18,12 @@ */ import { RequestBase } from '@_types/Base' -import { ExpandWildcards, Fields, Indices } from '@_types/common' +import { + ExpandWildcards, + Fields, + Indices, + ProjectRouting +} from '@_types/common' import { RuntimeFields } from '@_types/mapping/RuntimeFields' import { QueryContainer } from '@_types/query_dsl/abstractions' @@ -102,6 +107,18 @@ export interface Request extends RequestBase { * @server_default true */ include_empty_fields?: boolean + /** + * Specifies a subset of projects to target for the field-caps query using project + * metadata tags in a subset of Lucene query syntax. + * Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). + * Examples: + * _alias:my-project + * _alias:_origin + * _alias:*pr* + * Supported in serverless only. + * @availability serverless stability=stable visibility=feature_flag feature_flag=serverless.cross_project.enabled + */ + project_routing?: ProjectRouting } body: { /** diff --git a/specification/_global/msearch/MultiSearchRequest.ts b/specification/_global/msearch/MultiSearchRequest.ts index 4888c0666d..888b94ffba 100644 --- a/specification/_global/msearch/MultiSearchRequest.ts +++ b/specification/_global/msearch/MultiSearchRequest.ts @@ -18,7 +18,13 @@ */ import { RequestBase } from '@_types/Base' -import { ExpandWildcards, Indices, Routing, SearchType } from '@_types/common' +import { + ExpandWildcards, + Indices, + ProjectRouting, + Routing, + SearchType +} from '@_types/common' import { integer, long } from '@_types/Numeric' import { RequestItem } from './types' @@ -117,6 +123,17 @@ export interface Request extends RequestBase { * Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. */ pre_filter_shard_size?: long + /** + * Specifies a subset of projects to target for a search using project metadata + * tags in a subset Lucene syntax. Allowed Lucene queries: the _alias tag + * and a single value (possible wildcarded). Examples: + * _alias:my-project + * _alias:_origin + * _alias:*pr* + * Supported in serverless only. + * @availability serverless stability=stable visibility=feature_flag feature_flag=serverless.cross_project.enabled + */ + project_routing?: ProjectRouting /** * If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. * @server_default false diff --git a/specification/_global/msearch/types.ts b/specification/_global/msearch/types.ts index 836068f5a8..fbce7f4d0d 100644 --- a/specification/_global/msearch/types.ts +++ b/specification/_global/msearch/types.ts @@ -18,7 +18,13 @@ */ import { ErrorResponseBase } from '@_types/Base' -import { ExpandWildcards, Indices, Routing, SearchType } from '@_types/common' +import { + ExpandWildcards, + Indices, + ProjectRouting, + Routing, + SearchType +} from '@_types/common' import { integer, long } from '@_types/Numeric' import { SearchRequestBody } from '@global/search/_types/SearchRequestBody' import { ResponseBody as SearchResponse } from '@global/search/SearchResponse' @@ -37,6 +43,7 @@ export class MultisearchHeader { ignore_unavailable?: boolean index?: Indices preference?: string + project_routing?: ProjectRouting request_cache?: boolean routing?: Routing search_type?: SearchType diff --git a/specification/_global/msearch_template/MultiSearchTemplateRequest.ts b/specification/_global/msearch_template/MultiSearchTemplateRequest.ts index 8a3656d145..0a5db835b3 100644 --- a/specification/_global/msearch_template/MultiSearchTemplateRequest.ts +++ b/specification/_global/msearch_template/MultiSearchTemplateRequest.ts @@ -18,7 +18,7 @@ */ import { RequestBase } from '@_types/Base' -import { Indices, SearchType } from '@_types/common' +import { Indices, ProjectRouting, SearchType } from '@_types/common' import { long } from '@_types/Numeric' import { RequestItem } from './types' @@ -75,6 +75,18 @@ export interface Request extends RequestBase { * The maximum number of concurrent searches the API can run. */ max_concurrent_searches?: long + /** + * Specifies a subset of projects to target for the search using project + * metadata tags in a subset of Lucene query syntax. + * Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). + * Examples: + * _alias:my-project + * _alias:_origin + * _alias:*pr* + * Supported in serverless only. + * @availability serverless stability=stable visibility=feature_flag feature_flag=serverless.cross_project.enabled + */ + project_routing?: ProjectRouting /** * The type of the search operation. */ diff --git a/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts b/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts index c935925da0..c9e0d7ba51 100644 --- a/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts +++ b/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts @@ -18,7 +18,12 @@ */ import { RequestBase } from '@_types/Base' -import { ExpandWildcards, Indices, Routing } from '@_types/common' +import { + ExpandWildcards, + Indices, + ProjectRouting, + Routing +} from '@_types/common' import { integer } from '@_types/Numeric' import { QueryContainer } from '@_types/query_dsl/abstractions' import { Duration } from '@_types/Time' @@ -94,6 +99,18 @@ export interface Request extends RequestBase { * By default, it is random. */ preference?: string + /** + * Specifies a subset of projects to target for the PIT request using project + * metadata tags in a subset of Lucene query syntax. + * Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). + * Examples: + * _alias:my-project + * _alias:_origin + * _alias:*pr* + * Supported in serverless only. + * @availability serverless stability=stable visibility=feature_flag feature_flag=serverless.cross_project.enabled + */ + project_routing?: ProjectRouting /** * A custom value that is used to route operations to a specific shard. */ diff --git a/specification/_global/search/SearchRequest.ts b/specification/_global/search/SearchRequest.ts index 40a0187d19..1e5563994f 100644 --- a/specification/_global/search/SearchRequest.ts +++ b/specification/_global/search/SearchRequest.ts @@ -221,9 +221,10 @@ export interface Request extends RequestBase { */ pre_filter_shard_size?: long /** - * Specifies a subset of projects to target for a search using project metadata - * tags in a subset Lucene syntax. Allowed Lucene queries: the _alias tag - * and a single value (possible wildcarded). Examples: + * Specifies a subset of projects to target for the search using project + * metadata tags in a subset of Lucene query syntax. + * Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). + * Examples: * _alias:my-project * _alias:_origin * _alias:*pr* diff --git a/specification/_global/search_mvt/SearchMvtRequest.ts b/specification/_global/search_mvt/SearchMvtRequest.ts index d484884d9a..63e128901d 100644 --- a/specification/_global/search_mvt/SearchMvtRequest.ts +++ b/specification/_global/search_mvt/SearchMvtRequest.ts @@ -19,7 +19,7 @@ import { AggregationContainer } from '@_types/aggregations/AggregationContainer' import { RequestBase } from '@_types/Base' -import { Field, Fields, Indices } from '@_types/common' +import { Field, Fields, Indices, ProjectRouting } from '@_types/common' import { RuntimeFields } from '@_types/mapping/RuntimeFields' import { integer } from '@_types/Numeric' import { QueryContainer } from '@_types/query_dsl/abstractions' @@ -194,6 +194,18 @@ export interface Request extends RequestBase { * @server_default grid */ grid_type?: GridType + /** + * Specifies a subset of projects to target for the search using project + * metadata tags in a subset of Lucene query syntax. + * Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). + * Examples: + * _alias:my-project + * _alias:_origin + * _alias:*pr* + * Supported in serverless only. + * @availability serverless stability=stable visibility=feature_flag feature_flag=serverless.cross_project.enabled + */ + project_routing?: ProjectRouting /** * Maximum number of features to return in the hits layer. Accepts 0-10000. * If 0, results don't include the hits layer. diff --git a/specification/_global/search_template/SearchTemplateRequest.ts b/specification/_global/search_template/SearchTemplateRequest.ts index e6393bd7d5..fd4772cd50 100644 --- a/specification/_global/search_template/SearchTemplateRequest.ts +++ b/specification/_global/search_template/SearchTemplateRequest.ts @@ -22,6 +22,7 @@ import { ExpandWildcards, Id, Indices, + ProjectRouting, Routing, SearchType } from '@_types/common' @@ -99,6 +100,18 @@ export interface Request extends RequestBase { * If `true`, the query execution is profiled. * @server_default false */ profile?: boolean + /** + * Specifies a subset of projects to target for the search using project + * metadata tags in a subset of Lucene query syntax. + * Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). + * Examples: + * _alias:my-project + * _alias:_origin + * _alias:*pr* + * Supported in serverless only. + * @availability serverless stability=stable visibility=feature_flag feature_flag=serverless.cross_project.enabled + */ + project_routing?: ProjectRouting /** A custom value used to route operations to a specific shard. */ routing?: Routing /** diff --git a/specification/async_search/submit/AsyncSearchSubmitRequest.ts b/specification/async_search/submit/AsyncSearchSubmitRequest.ts index 08ee9b9e45..fc71e1e164 100644 --- a/specification/async_search/submit/AsyncSearchSubmitRequest.ts +++ b/specification/async_search/submit/AsyncSearchSubmitRequest.ts @@ -128,9 +128,10 @@ export interface Request extends RequestBase { max_concurrent_shard_requests?: integer preference?: string /** - * Specifies a subset of projects to target for a search using project metadata - * tags in a subset Lucene syntax. Allowed Lucene queries: the _alias tag - * and a single value (possible wildcarded). Examples: + * Specifies a subset of projects to target for the search using project + * metadata tags in a subset of Lucene query syntax. + * Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). + * Examples: * _alias:my-project * _alias:_origin * _alias:*pr* diff --git a/specification/cat/count/CatCountRequest.ts b/specification/cat/count/CatCountRequest.ts index a1b3b5f087..1ef7349c98 100644 --- a/specification/cat/count/CatCountRequest.ts +++ b/specification/cat/count/CatCountRequest.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Indices, Names } from '@_types/common' +import { Indices, Names, ProjectRouting } from '@_types/common' import { CatCountColumns, CatRequestBase } from '@cat/_types/CatBase' /** @@ -58,6 +58,18 @@ export interface Request extends CatRequestBase { * A comma-separated list of columns names to display. It supports simple wildcards. */ h?: CatCountColumns + /** + * Specifies a subset of projects to target for the search using project + * metadata tags in a subset of Lucene query syntax. + * Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). + * Examples: + * _alias:my-project + * _alias:_origin + * _alias:*pr* + * Supported in serverless only. + * @availability serverless stability=stable visibility=feature_flag feature_flag=serverless.cross_project.enabled + */ + project_routing?: ProjectRouting /** * List of columns that determine how the table should be sorted. * Sorting defaults to ascending and can be changed by setting `:asc` diff --git a/specification/eql/search/EqlSearchRequest.ts b/specification/eql/search/EqlSearchRequest.ts index 7365746f20..8955ad7efa 100644 --- a/specification/eql/search/EqlSearchRequest.ts +++ b/specification/eql/search/EqlSearchRequest.ts @@ -18,7 +18,7 @@ */ import { RequestBase } from '@_types/Base' -import { ExpandWildcards, Field, Indices } from '@_types/common' +import { ExpandWildcards, Field, Indices, ProjectRouting } from '@_types/common' import { RuntimeFields } from '@_types/mapping/RuntimeFields' import { integer, uint } from '@_types/Numeric' import { FieldAndFormat, QueryContainer } from '@_types/query_dsl/abstractions' @@ -85,6 +85,18 @@ export interface Request extends RequestBase { * @server_default false */ keep_on_completion?: boolean + /** + * Specifies a subset of projects to target for the search using project + * metadata tags in a subset of Lucene query syntax. + * Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). + * Examples: + * _alias:my-project + * _alias:_origin + * _alias:*pr* + * Supported in serverless only. + * @availability serverless stability=stable visibility=feature_flag feature_flag=serverless.cross_project.enabled + */ + project_routing?: ProjectRouting /** * Timeout duration to wait for the request to finish. Defaults to no timeout, meaning the request waits for complete search results. */ diff --git a/specification/indices/resolve_index/ResolveIndexRequest.ts b/specification/indices/resolve_index/ResolveIndexRequest.ts index 7e58beee0f..65bad15e33 100644 --- a/specification/indices/resolve_index/ResolveIndexRequest.ts +++ b/specification/indices/resolve_index/ResolveIndexRequest.ts @@ -18,7 +18,7 @@ */ import { RequestBase } from '@_types/Base' -import { ExpandWildcards, Names } from '@_types/common' +import { ExpandWildcards, Names, ProjectRouting } from '@_types/common' import { IndexMode } from '@indices/_types/DataStream' /** @@ -71,5 +71,17 @@ export interface Request extends RequestBase { * @availability serverless stability=stable visibility=public */ mode?: IndexMode | IndexMode[] + /** + * Specifies a subset of projects to target using project + * metadata tags in a subset of Lucene query syntax. + * Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). + * Examples: + * _alias:my-project + * _alias:_origin + * _alias:*pr* + * Supported in serverless only. + * @availability serverless stability=stable visibility=feature_flag feature_flag=serverless.cross_project.enabled + */ + project_routing?: ProjectRouting } } diff --git a/specification/sql/query/QuerySqlRequest.ts b/specification/sql/query/QuerySqlRequest.ts index a32c279833..f0f631cd1a 100644 --- a/specification/sql/query/QuerySqlRequest.ts +++ b/specification/sql/query/QuerySqlRequest.ts @@ -18,6 +18,7 @@ */ import { RequestBase } from '@_types/Base' +import { ProjectRouting } from '@_types/common' import { RuntimeFields } from '@_types/mapping/RuntimeFields' import { integer } from '@_types/Numeric' import { QueryContainer } from '@_types/query_dsl/abstractions' @@ -48,6 +49,18 @@ export interface Request extends RequestBase { * @ext_doc_id sql-rest-format */ format?: SqlFormat + /** + * Specifies a subset of projects to target for the search using project + * metadata tags in a subset of Lucene query syntax. + * Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). + * Examples: + * _alias:my-project + * _alias:_origin + * _alias:*pr* + * Supported in serverless only. + * @availability serverless stability=stable visibility=feature_flag feature_flag=serverless.cross_project.enabled + */ + project_routing?: ProjectRouting } body: { /**