explainedit

client.explain({
  id: string,
  index: string,
  type: string,
  analyze_wildcard: boolean,
  analyzer: string,
  default_operator: 'AND' | 'OR',
  df: string,
  stored_fields: string | string[],
  lenient: boolean,
  parent: string,
  preference: string,
  q: string,
  routing: string,
  _source: string | string[],
  _source_exclude: string | string[],
  _source_include: string | string[],
  body: object
})

Reference

id

string - The document ID

index

string - The name of the index

type

string - The type of the document

analyze_wildcard or analyzeWildcard

boolean - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)

analyzer

string - The analyzer for the query string query

default_operator or defaultOperator

'AND' | 'OR' - The default operator for query string query (AND or OR)
Default: OR

df

string - The default field for query string query (default: _all)

stored_fields or storedFields

string | string[] - A comma-separated list of stored fields to return in the response

lenient

boolean - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

parent

string - The ID of the parent document

preference

string - Specify the node or shard the operation should be performed on (default: random)

q

string - Query in the Lucene query string syntax

routing

string - Specific routing value

_source

string | string[] - True or false to return the _source field or not, or a list of fields to return

_source_exclude or _sourceExclude

string | string[] - A list of fields to exclude from the returned _source field

_source_include or _sourceInclude

string | string[] - A list of fields to extract and return from the _source field

body

object - The query definition using the Query DSL