Skip to content

Commit 6b15af9

Browse files
Add missing include_ccs_metadata to ES|QL query endpoints (#3743)
* Add missing `include_ccs_metadata` to ES|QL query endpoints * Address review comments * Regenerate output --------- Co-authored-by: lcawl <[email protected]>
1 parent 0efbba5 commit 6b15af9

File tree

9 files changed

+84
-6
lines changed

9 files changed

+84
-6
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 8 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: 4 additions & 0 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: 13 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 28 additions & 2 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/esql/async_query/AsyncQueryRequest.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,5 +114,12 @@ export interface Request extends RequestBase {
114114
* name and the next level key is the column name.
115115
*/
116116
tables?: Dictionary<string, Dictionary<string, TableValuesContainer>>
117+
/**
118+
* When set to `true` and performing a cross-cluster query, the response will include an extra `_clusters`
119+
* object with information about the clusters that participated in the search along with info such as shards
120+
* count.
121+
* @server_default false
122+
*/
123+
include_ccs_metadata?: boolean
117124
}
118125
}

specification/esql/async_query/examples/request/AsyncQueryRequestExample1.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,15 @@
22
# method_request: "POST /_query/async"
33
# description:
44
# type: request
5-
value: "{\n \"query\": \"\"\"\n FROM library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n \"\"\",\n \"wait_for_completion_timeout\": \"2s\"\n}"
5+
value: |-
6+
{
7+
"query": """
8+
FROM library,remote-*:library
9+
| EVAL year = DATE_TRUNC(1 YEARS, release_date)
10+
| STATS MAX(page_count) BY year
11+
| SORT year
12+
| LIMIT 5
13+
""",
14+
"wait_for_completion_timeout": "2s",
15+
"include_ccs_metadata": true
16+
}

specification/esql/query/QueryRequest.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,12 @@ export interface Request extends RequestBase {
9494
* name and the next level key is the column name.
9595
*/
9696
tables?: Dictionary<string, Dictionary<string, TableValuesContainer>>
97+
/**
98+
* When set to `true` and performing a cross-cluster query, the response will include an extra `_clusters`
99+
* object with information about the clusters that participated in the search along with info such as shards
100+
* count.
101+
* @server_default false
102+
*/
103+
include_ccs_metadata?: boolean
97104
}
98105
}

specification/esql/query/examples/request/QueryRequestExample1.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ description: Run `POST /_query` to get results for an ES|QL query.
55
value: |-
66
{
77
"query": """
8-
FROM library
8+
FROM library,remote-*:library
99
| EVAL year = DATE_TRUNC(1 YEARS, release_date)
1010
| STATS MAX(page_count) BY year
1111
| SORT year
1212
| LIMIT 5
13-
"""
13+
""",
14+
"include_ccs_metadata": true
1415
}

0 commit comments

Comments
 (0)