Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Clarify Count API query options #3611

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions output/openapi/elasticsearch-openapi.json

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

10 changes: 5 additions & 5 deletions output/openapi/elasticsearch-serverless-openapi.json

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

8 changes: 4 additions & 4 deletions output/schema/schema.json

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

10 changes: 5 additions & 5 deletions specification/_global/count/CountRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import { Operator } from '@_types/query_dsl/Operator'
* Count search results.
* Get the number of documents matching a query.
*
* The query can either be provided using a simple query string as a parameter or using the Query DSL defined within the request body.
* The latter must be nested in a `query` key, which is the same as the search API.
* The query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.
* The query is optional. When no query is provided, the API uses `match_all` to count all the documents.
*
* The count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.
*
Expand Down Expand Up @@ -140,14 +140,14 @@ export interface Request extends RequestBase {
*/
terminate_after?: long
/**
* The query in Lucene query string syntax.
* The query in Lucene query string syntax. This parameter cannot be used with a request body.
*/
q?: string
}
body: {
/**
* Defines the search definition using the Query DSL.
* The query is optional, and when not provided, it will use `match_all` to count all the docs.
* Defines the search query using Query DSL. A request body query cannot be used
* with the `q` query string parameter.
*/
query?: QueryContainer
}
Expand Down
Loading