[[reference-get]] //////// =========================================================================================================================== || || || || || || || ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ || || ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ || || ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ || || ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ || || ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ || || ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ || || || || || || 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.get Get a document by its ID. Retrieves the document with the specified ID from an index. {ref}/docs-get.html[{es} documentation] [discrete] ==== Function signature [source,ts] ---- (GetRequest, options?): Promise ---- [discrete] ===== `GetRequest` [source,ts] ---- interface GetRequest extends <> { id: <> index: <> force_synthetic_source?: boolean preference?: string realtime?: boolean refresh?: boolean routing?: <> _source?: SearchSourceConfigParam _source_excludes?: <> _source_includes?: <> stored_fields?: <> version?: <> version_type?: <> } ---- [discrete] ===== `GetResponse` [source,ts] ---- type GetResponse = GetGetResult ----