diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 3b030d3111..87ed4c81b2 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -8839,6 +8839,10 @@ "$ref": "#/components/schemas/esql._types:TableValuesContainer" } } + }, + "include_ccs_metadata": { + "description": "If provided and `true`, the response will include an extra `_clusters` object with information\nabout the clusters that participated in the search along with info such as shards count.", + "type": "boolean" } }, "required": [ @@ -9102,6 +9106,10 @@ "$ref": "#/components/schemas/esql._types:TableValuesContainer" } } + }, + "include_ccs_metadata": { + "description": "If provided and `true`, the response will include an extra `_clusters` object with information\nabout the clusters that participated in the search along with info such as shards count.", + "type": "boolean" } }, "required": [ diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 9db4a6b641..4af0389498 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -5255,6 +5255,10 @@ "$ref": "#/components/schemas/esql._types:TableValuesContainer" } } + }, + "include_ccs_metadata": { + "description": "If provided and `true`, the response will include an extra `_clusters` object with information\nabout the clusters that participated in the search along with info such as shards count.", + "type": "boolean" } }, "required": [ diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 2206266797..5ad97b66b6 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -18582,6 +18582,18 @@ } } } + }, + { + "description": "If provided and `true`, the response will include an extra `_clusters` object with information\nabout the clusters that participated in the search along with info such as shards count.", + "name": "include_ccs_metadata", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ] }, @@ -18637,7 +18649,7 @@ } } ], - "specLocation": "esql/query/QueryRequest.ts#L27-L98" + "specLocation": "esql/query/QueryRequest.ts#L27-L103" }, { "body": { diff --git a/output/schema/schema.json b/output/schema/schema.json index d5bb518ba8..e672d37d3e 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -122388,6 +122388,18 @@ } } } + }, + { + "description": "If provided and `true`, the response will include an extra `_clusters` object with information\nabout the clusters that participated in the search along with info such as shards count.", + "name": "include_ccs_metadata", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ] }, @@ -122481,7 +122493,7 @@ } } ], - "specLocation": "esql/async_query/AsyncQueryRequest.ts#L28-L118" + "specLocation": "esql/async_query/AsyncQueryRequest.ts#L28-L123" }, { "kind": "response", @@ -122832,6 +122844,18 @@ } } } + }, + { + "description": "If provided and `true`, the response will include an extra `_clusters` object with information\nabout the clusters that participated in the search along with info such as shards count.", + "name": "include_ccs_metadata", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ] }, @@ -122886,7 +122910,7 @@ } } ], - "specLocation": "esql/query/QueryRequest.ts#L27-L98" + "specLocation": "esql/query/QueryRequest.ts#L27-L103" }, { "kind": "response", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 3e53dc2c7f..6392699792 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10557,6 +10557,7 @@ export interface EsqlAsyncQueryRequest extends RequestBase { profile?: boolean query: string tables?: Record> + include_ccs_metadata?: boolean } } @@ -10596,6 +10597,7 @@ export interface EsqlQueryRequest extends RequestBase { profile?: boolean query: string tables?: Record> + include_ccs_metadata?: boolean } } diff --git a/specification/esql/async_query/AsyncQueryRequest.ts b/specification/esql/async_query/AsyncQueryRequest.ts index 0f2ed505ed..5a3c210f5c 100644 --- a/specification/esql/async_query/AsyncQueryRequest.ts +++ b/specification/esql/async_query/AsyncQueryRequest.ts @@ -114,5 +114,10 @@ export interface Request extends RequestBase { * name and the next level key is the column name. */ tables?: Dictionary> + /** + * If provided and `true`, 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. + */ + include_ccs_metadata?: boolean } } diff --git a/specification/esql/async_query/examples/request/AsyncQueryRequestExample1.yaml b/specification/esql/async_query/examples/request/AsyncQueryRequestExample1.yaml index 1cafcc7712..968c685778 100644 --- a/specification/esql/async_query/examples/request/AsyncQueryRequestExample1.yaml +++ b/specification/esql/async_query/examples/request/AsyncQueryRequestExample1.yaml @@ -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 + } diff --git a/specification/esql/query/QueryRequest.ts b/specification/esql/query/QueryRequest.ts index a9097b29b0..ff0a5ab797 100644 --- a/specification/esql/query/QueryRequest.ts +++ b/specification/esql/query/QueryRequest.ts @@ -94,5 +94,10 @@ export interface Request extends RequestBase { * name and the next level key is the column name. */ tables?: Dictionary> + /** + * If provided and `true`, 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. + */ + include_ccs_metadata?: boolean } } diff --git a/specification/esql/query/examples/request/QueryRequestExample1.yaml b/specification/esql/query/examples/request/QueryRequestExample1.yaml index e6167f7175..14cb30810d 100644 --- a/specification/esql/query/examples/request/QueryRequestExample1.yaml +++ b/specification/esql/query/examples/request/QueryRequestExample1.yaml @@ -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 }