Skip to content

Commit

Permalink
Add missing include_ccs_metadata to ES|QL query endpoints (#3743)
Browse files Browse the repository at this point in the history
* Add missing `include_ccs_metadata` to ES|QL query endpoints

* Address review comments

* Regenerate output

---------

Co-authored-by: lcawl <[email protected]>
  • Loading branch information
pawankartik-elastic and lcawl authored Feb 11, 2025
1 parent 0efbba5 commit 6b15af9
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 6 deletions.
8 changes: 8 additions & 0 deletions output/openapi/elasticsearch-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions output/openapi/elasticsearch-serverless-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion output/schema/schema-serverless.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 28 additions & 2 deletions output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions specification/esql/async_query/AsyncQueryRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,12 @@ export interface Request extends RequestBase {
* name and the next level key is the column name.
*/
tables?: Dictionary<string, Dictionary<string, TableValuesContainer>>
/**
* When set to `true` and performing a cross-cluster query, the response will include an extra `_clusters`
* object with information about the clusters that participated in the search along with info such as shards
* count.
* @server_default false
*/
include_ccs_metadata?: boolean
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,15 @@
# method_request: "POST /_query/async"
# description:
# type: request
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}"
value: |-
{
"query": """
FROM library,remote-*:library
| EVAL year = DATE_TRUNC(1 YEARS, release_date)
| STATS MAX(page_count) BY year
| SORT year
| LIMIT 5
""",
"wait_for_completion_timeout": "2s",
"include_ccs_metadata": true
}
7 changes: 7 additions & 0 deletions specification/esql/query/QueryRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,12 @@ export interface Request extends RequestBase {
* name and the next level key is the column name.
*/
tables?: Dictionary<string, Dictionary<string, TableValuesContainer>>
/**
* When set to `true` and performing a cross-cluster query, the response will include an extra `_clusters`
* object with information about the clusters that participated in the search along with info such as shards
* count.
* @server_default false
*/
include_ccs_metadata?: boolean
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ description: Run `POST /_query` to get results for an ES|QL query.
value: |-
{
"query": """
FROM library
FROM library,remote-*:library
| EVAL year = DATE_TRUNC(1 YEARS, release_date)
| STATS MAX(page_count) BY year
| SORT year
| LIMIT 5
"""
""",
"include_ccs_metadata": true
}

0 comments on commit 6b15af9

Please sign in to comment.