Skip to content

Commit 8a1ac79

Browse files
committed
Fix async_search query parameter validation
1 parent 1afed69 commit 8a1ac79

File tree

9 files changed

+86
-71
lines changed

9 files changed

+86
-71
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 11 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: 11 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: 18 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: 18 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 & 10 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: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_json_spec/async_search.submit.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@
6161
"type": "boolean",
6262
"description": "Specify whether wildcard and prefix queries should be analyzed (default: false)"
6363
},
64+
"ccs_minimize_roundtrips": {
65+
"type": "boolean",
66+
"default": false,
67+
"description": "When doing a cross-cluster search, setting it to true may improve overall search latency, particularly when searching clusters with a large number of shards. However, when set to true, the progress of searches on the remote clusters will not be received until the search finishes on all clusters."
68+
},
6469
"default_operator": {
6570
"type": "enum",
6671
"options": ["AND", "OR"],
@@ -113,6 +118,16 @@
113118
"type": "string",
114119
"description": "Specify the node or shard the operation should be performed on (default: random)"
115120
},
121+
"pre_filter_shard_size": {
122+
"type": "number",
123+
"default": 1,
124+
"description": "Cannot be changed: this is to enforce the execution of a pre-filter roundtrip to retrieve statistics from each shard so that the ones that surely don’t hold any document matching the query get skipped."
125+
},
126+
"rest_total_hits_as_int": {
127+
"type": "boolean",
128+
"description": "Indicates whether hits.total should be rendered as an integer or an object in the rest search response",
129+
"default": false
130+
},
116131
"q": {
117132
"type": "string",
118133
"description": "Query in the Lucene query string syntax"

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)