indices.validateQueryedit

client.indices.validateQuery({
  index: string | string[],
  type: string | string[],
  explain: boolean,
  ignore_unavailable: boolean,
  allow_no_indices: boolean,
  expand_wildcards: 'open' | 'closed' | 'none' | 'all',
  operation_threading: undefined,
  q: string,
  analyzer: string,
  analyze_wildcard: boolean,
  default_operator: 'AND' | 'OR',
  df: string,
  lenient: boolean,
  rewrite: boolean,
  all_shards: boolean,
  body: object
})

Reference

index

string | string[] - A comma-separated list of index names to restrict the operation; use _all or empty string to perform the operation on all indices

type

string | string[] - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types

explain

boolean - Return detailed information about the error

ignore_unavailable or ignoreUnavailable

boolean - Whether specified concrete indices should be ignored when unavailable (missing or closed)

allow_no_indices or allowNoIndices

boolean - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

expand_wildcards or expandWildcards

'open' | 'closed' | 'none' | 'all' - Whether to expand wildcard expression to concrete indices that are open, closed or both.
Default: open

operation_threading or operationThreading

`` - TODO: ?

q

string - Query in the Lucene query string syntax

analyzer

string - The analyzer to use for the query string

analyze_wildcard or analyzeWildcard

boolean - Specify whether wildcard and prefix queries should be analyzed (default: false)

default_operator or defaultOperator

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

df

string - The field to use as default where no field prefix is given in the query string

lenient

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

rewrite

boolean - Provide a more detailed explanation showing the actual Lucene query that will be executed.

all_shards or allShards

boolean - Execute validation on all shards instead of one random shard per index

body

object - The query definition specified with the Query DSL