Skip to content

Commit 4c036bd

Browse files
Clarify query options (#3611) (#3628)
(cherry picked from commit 8e9c71a) Co-authored-by: Marci W <[email protected]>
1 parent 259cf42 commit 4c036bd

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
*
@@ -140,14 +140,14 @@ export interface Request extends RequestBase {
140140
*/
141141
terminate_after?: long
142142
/**
143-
* The query in Lucene query string syntax.
143+
* The query in Lucene query string syntax. This parameter cannot be used with a request body.
144144
*/
145145
q?: string
146146
}
147147
body: {
148148
/**
149-
* Defines the search definition using the Query DSL.
150-
* The query is optional, and when not provided, it will use `match_all` to count all the docs.
149+
* Defines the search query using Query DSL. A request body query cannot be used
150+
* with the `q` query string parameter.
151151
*/
152152
query?: QueryContainer
153153
}

0 commit comments

Comments
 (0)