[[reference-explain]] //////// =========================================================================================================================== || || || || || || || ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ || || ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ || || ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ || || ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ || || ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ || || ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ || || || || || || 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.explain Explain a document match result. Returns information about why a specific document matches, or doesn’t match, a query. {ref}/search-explain.html[{es} documentation] [discrete] ==== Function signature [source,ts] ---- (ExplainRequest, options?): Promise ---- [discrete] ===== `ExplainRequest` [source,ts] ---- interface ExplainRequest extends <> { id: <> index: <> analyzer?: string analyze_wildcard?: boolean default_operator?: QueryDslOperator df?: string lenient?: boolean preference?: string routing?: <> _source?: SearchSourceConfigParam _source_excludes?: <> _source_includes?: <> stored_fields?: <> q?: string query?: QueryDslQueryContainer } ---- [discrete] ===== `ExplainResponse` [source,ts] ---- interface ExplainResponse { _index: <> _id: <> matched: boolean explanation?: ExplainExplanationDetail get?: <> } ----