Files
elasticsearch-js/docs/reference-count.asciidoc
2024-12-05 14:46:46 -06:00

79 lines
4.3 KiB
Plaintext

[[reference-count]]
////////
===========================================================================================================================
|| ||
|| ||
|| ||
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|| ||
|| ||
|| This file is autogenerated, DO NOT send pull requests that changes this file directly. ||
|| You should update the script that does the generation, which can be found in: ||
|| https://github.com/elastic/elastic-client-generator-js ||
|| ||
|| You can run the script with the following command: ||
|| npm run elasticsearch -- --version <version> ||
|| ||
|| ||
|| ||
===========================================================================================================================
////////
[discrete]
=== client.count
Returns number of documents matching a query.
{ref}/search-count.html[{es} documentation]
[discrete]
==== Function signature
[source,ts]
----
(CountRequest, options?): Promise<CountResponse>
----
[discrete]
===== `CountRequest`
[source,ts]
----
interface CountRequest extends <<shared-type-request-base, RequestBase>> {
index?: <<shared-type-indices, Indices>>
allow_no_indices?: boolean
analyzer?: string
analyze_wildcard?: boolean
default_operator?: QueryDslOperator
df?: string
expand_wildcards?: <<shared-type-expand-wildcards, ExpandWildcards>>
ignore_throttled?: boolean
ignore_unavailable?: boolean
lenient?: boolean
min_score?: <<shared-type-double, double>>
preference?: string
routing?: <<shared-type-routing, Routing>>
terminate_after?: <<shared-type-long, long>>
q?: string
query?: QueryDslQueryContainer
}
----
[discrete]
===== `CountResponse`
[source,ts]
----
interface CountResponse {
count: <<shared-type-long, long>>
_shards: <<shared-type-shard-statistics, ShardStatistics>>
}
----