[[reference-indices-stats]] //////// =========================================================================================================================== || || || || || || || ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ || || ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ || || ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ || || ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ || || ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ || || ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ || || || || || || 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.indices.stats Returns statistics for one or more indices. For data streams, the API retrieves statistics for the stream’s backing indices. {ref}/indices-stats.html[{es} documentation] [discrete] ==== Function signature [source,ts] ---- (IndicesStatsRequest, options?): Promise ---- [discrete] ===== `IndicesStatsRequest` [source,ts] ---- interface IndicesStatsRequest extends <> { metric?: <> index?: <> completion_fields?: <> expand_wildcards?: <> fielddata_fields?: <> fields?: <> forbid_closed_indices?: boolean groups?: string | string[] include_segment_file_sizes?: boolean include_unloaded_segments?: boolean level?: <> } ---- [discrete] ===== `IndicesStatsResponse` [source,ts] ---- interface IndicesStatsResponse { indices?: Record _shards: <> _all: IndicesStatsIndicesStats } ----