Skip to content

Commit 85fef2a

Browse files
committed
Adds project_routing query param to _msearch Elasticsearch API
1 parent f5e72ea commit 85fef2a

File tree

7 files changed

+88
-8
lines changed

7 files changed

+88
-8
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 36 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_global/msearch/MultiSearchRequest.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@
1818
*/
1919

2020
import { RequestBase } from '@_types/Base'
21-
import { ExpandWildcards, Indices, Routing, SearchType } from '@_types/common'
21+
import {
22+
ExpandWildcards,
23+
Indices,
24+
ProjectRouting,
25+
Routing,
26+
SearchType
27+
} from '@_types/common'
2228
import { integer, long } from '@_types/Numeric'
2329
import { RequestItem } from './types'
2430

@@ -117,6 +123,17 @@ export interface Request extends RequestBase {
117123
* 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.
118124
*/
119125
pre_filter_shard_size?: long
126+
/**
127+
* Specifies a subset of projects to target for a search using project metadata
128+
* tags in a subset Lucene syntax. Allowed Lucene queries: the _alias tag
129+
* and a single value (possible wildcarded). Examples:
130+
* _alias:my-project
131+
* _alias:_origin
132+
* _alias:*pr*
133+
* Supported in serverless only.
134+
* @availability serverless stability=stable visibility=feature_flag feature_flag=serverless.cross_project.enabled
135+
*/
136+
project_routing?: ProjectRouting
120137
/**
121138
* If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.
122139
* @server_default false

specification/_global/msearch/types.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@
1818
*/
1919

2020
import { ErrorResponseBase } from '@_types/Base'
21-
import { ExpandWildcards, Indices, Routing, SearchType } from '@_types/common'
21+
import {
22+
ExpandWildcards,
23+
Indices,
24+
ProjectRouting,
25+
Routing,
26+
SearchType
27+
} from '@_types/common'
2228
import { integer, long } from '@_types/Numeric'
2329
import { SearchRequestBody } from '@global/search/_types/SearchRequestBody'
2430
import { ResponseBody as SearchResponse } from '@global/search/SearchResponse'
@@ -37,6 +43,7 @@ export class MultisearchHeader {
3743
ignore_unavailable?: boolean
3844
index?: Indices
3945
preference?: string
46+
project_routing?: ProjectRouting
4047
request_cache?: boolean
4148
routing?: Routing
4249
search_type?: SearchType

specification/_json_spec/msearch.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@
8484
"default": "open",
8585
"description": "Whether to expand wildcard expression to concrete indices that are open, closed or both."
8686
},
87+
"project_routing": {
88+
"type": "string",
89+
"description": "A Lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. Only supported in serverless."
90+
},
8791
"routing": {
8892
"type": "list",
8993
"description": "A comma-separated list of specific routing values"

0 commit comments

Comments
 (0)