81 lines
4.5 KiB
Plaintext
81 lines
4.5 KiB
Plaintext
[[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 <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<ExplainResponse>
|
||
----
|
||
|
||
[discrete]
|
||
===== `ExplainRequest`
|
||
|
||
[source,ts]
|
||
----
|
||
interface ExplainRequest extends <<shared-type-request-base, RequestBase>> {
|
||
id: <<shared-type-id, Id>>
|
||
index: <<shared-type-index-name, IndexName>>
|
||
analyzer?: string
|
||
analyze_wildcard?: boolean
|
||
default_operator?: QueryDslOperator
|
||
df?: string
|
||
lenient?: boolean
|
||
preference?: string
|
||
routing?: <<shared-type-routing, Routing>>
|
||
_source?: SearchSourceConfigParam
|
||
_source_excludes?: <<shared-type-fields, Fields>>
|
||
_source_includes?: <<shared-type-fields, Fields>>
|
||
stored_fields?: <<shared-type-fields, Fields>>
|
||
q?: string
|
||
query?: QueryDslQueryContainer
|
||
}
|
||
----
|
||
|
||
[discrete]
|
||
===== `ExplainResponse`
|
||
|
||
[source,ts]
|
||
----
|
||
interface ExplainResponse<TDocument = unknown> {
|
||
_index: <<shared-type-index-name, IndexName>>
|
||
_id: <<shared-type-id, Id>>
|
||
matched: boolean
|
||
explanation?: ExplainExplanationDetail
|
||
get?: <<shared-type-inline-get, InlineGet>><TDocument>
|
||
}
|
||
----
|
||
|