[[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 || || || || || || || =========================================================================================================================== //////// [discrete] === client.count Returns number of documents matching a query. {ref}/search-count.html[{es} documentation] [discrete] ==== Function signature [source,ts] ---- (CountRequest, options?): Promise ---- [discrete] ===== `CountRequest` [source,ts] ---- interface CountRequest extends <> { index?: <> allow_no_indices?: boolean analyzer?: string analyze_wildcard?: boolean default_operator?: QueryDslOperator df?: string expand_wildcards?: <> ignore_throttled?: boolean ignore_unavailable?: boolean lenient?: boolean min_score?: <> preference?: string routing?: <> terminate_after?: <> q?: string query?: QueryDslQueryContainer } ---- [discrete] ===== `CountResponse` [source,ts] ---- interface CountResponse { count: <> _shards: <> } ----