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

90 lines
4.2 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]]
=== 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]
==== Request
[pass]
++++
<pre>
++++
interface CountRequest extends <<RequestBase>> {
index?: <<Indices>>
allow_no_indices?: boolean
analyzer?: string
analyze_wildcard?: boolean
default_operator?: <<QueryDslOperator>>
df?: string
expand_wildcards?: <<ExpandWildcards>>
ignore_throttled?: boolean
ignore_unavailable?: boolean
lenient?: boolean
min_score?: <<double>>
preference?: string
routing?: <<Routing>>
terminate_after?: <<long>>
q?: string
query?: <<QueryDslQueryContainer>>
}
[pass]
++++
</pre>
++++
[discrete]
==== Response
[pass]
++++
<pre>
++++
interface CountResponse {
count: <<long>>
_shards: <<ShardStatistics>>
}
[pass]
++++
</pre>
++++