Skip to content

Commit db7943e

Browse files
authored
Fix async_search query parameter validation (#3167)
1 parent 2942c94 commit db7943e

File tree

8 files changed

+67
-68
lines changed

8 files changed

+67
-68
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 10 additions & 15 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 & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema-serverless.json

Lines changed: 17 additions & 14 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: 17 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/validation-errors.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,8 @@
4949
"type_alias definition _global.search._types:Suggest - Expected 1 generic parameters but got 0"
5050
]
5151
},
52-
"async_search.status": {
53-
"request": [
54-
"Request: missing json spec query parameter 'keep_alive'"
55-
],
56-
"response": []
57-
},
5852
"async_search.submit": {
5953
"request": [
60-
"Request: query parameter 'scroll' does not exist in the json spec",
6154
"interface definition _types:QueryVectorBuilder - Property text_embedding is a single-variant and must be required",
6255
"type_alias definition _spec_utils:PipeSeparatedFlags / union_of / instance_of - No type definition for '_spec_utils.PipeSeparatedFlags:T'"
6356
],

output/typescript/types.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/async_search/status/AsyncSearchStatusRequest.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import { RequestBase } from '@_types/Base'
2121
import { Id } from '@_types/common'
22+
import { Duration } from '@_types/Time'
2223

2324
/**
2425
* Get the async search status.
@@ -36,4 +37,12 @@ export interface Request extends RequestBase {
3637
/** A unique identifier for the async search. */
3738
id: Id
3839
}
40+
query_parameters: {
41+
/**
42+
* Specifies how long the async search needs to be available.
43+
* Ongoing async searches and any saved search results are deleted after this period.
44+
* @server_default 5d
45+
*/
46+
keep_alive?: Duration
47+
}
3948
}

specification/async_search/submit/AsyncSearchSubmitRequest.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ import { Duration } from '@_types/Time'
6666
* @doc_id async-search
6767
* @doc_tag search
6868
*/
69-
// NOTE: this is a SearchRequest with 3 added parameters: wait_for_completion_timeout, keep_on_completion and keep_alive
69+
// NOTE: this is a SearchRequest with:
70+
// * 3 added parameters: wait_for_completion_timeout, keep_on_completion and keep_alive
71+
// * 1 removed parameters: scroll
7072
export interface Request extends RequestBase {
7173
path_parts: {
7274
index?: Indices
@@ -122,7 +124,6 @@ export interface Request extends RequestBase {
122124
/** @server_default true */
123125
request_cache?: boolean
124126
routing?: Routing
125-
scroll?: Duration
126127
search_type?: SearchType
127128
stats?: string[]
128129
stored_fields?: Fields

0 commit comments

Comments
 (0)