Skip to content

Commit d1a227c

Browse files
Clarify query options (#3611) (#3629)
(cherry picked from commit 8e9c71a) Co-authored-by: Marci W <[email protected]>
1 parent 2c8307f commit d1a227c

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

output/openapi/elasticsearch-openapi.json

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

specification/_global/count/CountRequest.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import { Operator } from '@_types/query_dsl/Operator'
2727
* Count search results.
2828
* Get the number of documents matching a query.
2929
*
30-
* The query can either be provided using a simple query string as a parameter or using the Query DSL defined within the request body.
31-
* The latter must be nested in a `query` key, which is the same as the search API.
30+
* The query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.
31+
* The query is optional. When no query is provided, the API uses `match_all` to count all the documents.
3232
*
3333
* The count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.
3434
*
@@ -130,14 +130,14 @@ export interface Request extends RequestBase {
130130
*/
131131
terminate_after?: long
132132
/**
133-
* The query in Lucene query string syntax.
133+
* The query in Lucene query string syntax. This parameter cannot be used with a request body.
134134
*/
135135
q?: string
136136
}
137137
body: {
138138
/**
139-
* Defines the search definition using the Query DSL.
140-
* The query is optional, and when not provided, it will use `match_all` to count all the docs.
139+
* Defines the search query using Query DSL. A request body query cannot be used
140+
* with the `q` query string parameter.
141141
*/
142142
query?: QueryContainer
143143
}

0 commit comments

Comments
 (0)