indices.validateQueryedit

client.indices.validateQuery([params, [callback]])

Validate a potentially expensive query without executing it.

Check the API Conventions and the elasticsearch docs for more information pertaining to this method.

Params

explain

Boolean — Return detailed information about the error

ignoreUnavailable

Boolean — Whether specified concrete indices should be ignored when unavailable (missing or closed)

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)

[expandWildcards=open]

String — Whether to expand wildcard expression to concrete indices that are open, closed or both.

Options
  • "open"
  • "closed"
  • "none"
  • "all"

q

String — Query in the Lucene query string syntax

analyzer

String — The analyzer to use for the query string

analyzeWildcard

Boolean — Specify whether wildcard and prefix queries should be analyzed (default: false)

[defaultOperator=OR]

String — The default operator for query string query (AND or OR)

Options
  • "AND"
  • "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.

allShards

Boolean — Execute validation on all shards instead of one random shard per index

index

String, String[], Boolean — 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[], Boolean — A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types

body

Object, JSON — An optional request body, as either JSON or a JSON serializable object. See the elasticsearch docs for details about what can be specified here.

back to top