From 8a3b245153ade261b0b8e9e42f8a9fd9608df4e6 Mon Sep 17 00:00:00 2001 From: piergm <134913285+piergm@users.noreply.github.com> Date: Thu, 27 Nov 2025 12:30:43 +0100 Subject: [PATCH] adds specifications for project_routing in the body of _search and _async_search request --- output/schema/schema.json | 42 ++++++++++++++++++- output/typescript/types.ts | 2 + specification/_global/search/SearchRequest.ts | 12 ++++++ .../submit/AsyncSearchSubmitRequest.ts | 12 ++++++ 4 files changed, 66 insertions(+), 2 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 6d626e1b6a..be9035b64c 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -39583,6 +39583,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" + } + } } ] }, @@ -40345,7 +40364,7 @@ } } ], - "specLocation": "_global/search/SearchRequest.ts#L54-L608" + "specLocation": "_global/search/SearchRequest.ts#L54-L620" }, { "kind": "response", @@ -101464,6 +101483,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" + } + } } ] }, @@ -102092,7 +102130,7 @@ } } ], - "specLocation": "async_search/submit/AsyncSearchSubmitRequest.ts#L55-L325" + "specLocation": "async_search/submit/AsyncSearchSubmitRequest.ts#L55-L337" }, { "kind": "response", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 0c16a633de..593e19a193 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -1250,6 +1250,7 @@ export interface SearchRequest extends RequestBase { pit?: SearchPointInTimeReference runtime_mappings?: MappingRuntimeFields stats?: string[] + project_routing?: ProjectRouting } } @@ -7344,6 +7345,7 @@ export interface AsyncSearchSubmitRequest extends RequestBase { pit?: SearchPointInTimeReference runtime_mappings?: MappingRuntimeFields stats?: string[] + project_routing?: ProjectRouting } } diff --git a/specification/_global/search/SearchRequest.ts b/specification/_global/search/SearchRequest.ts index 8f528160ac..1c7985c310 100644 --- a/specification/_global/search/SearchRequest.ts +++ b/specification/_global/search/SearchRequest.ts @@ -604,5 +604,17 @@ export interface Request extends RequestBase { * You can retrieve these stats using the indices stats API. */ stats?: 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 } } diff --git a/specification/async_search/submit/AsyncSearchSubmitRequest.ts b/specification/async_search/submit/AsyncSearchSubmitRequest.ts index faaa98f380..30673a56ea 100644 --- a/specification/async_search/submit/AsyncSearchSubmitRequest.ts +++ b/specification/async_search/submit/AsyncSearchSubmitRequest.ts @@ -321,5 +321,17 @@ export interface Request extends RequestBase { * the indices stats API. */ stats?: 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 } }