12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- [[esql-index-options]]
- === {esql} index options
- ++++
- <titleabbrev>Index options</titleabbrev>
- ++++
- The `OPTIONS` directive of the <<esql-from,FROM>> command allows configuring
- the way {esql} accesses the data to be queried. The argument passed to this
- directive is a comma-separated list of option name-value pairs, with the option
- name and the corresponding value double-quoted.
- [source,esql]
- ----
- FROM index_pattern [OPTIONS "option1"="value1"[,...[,"optionN"="valueN"]]]
- ----
- These options can only be provided as part of a <<esql-from,FROM>> command,
- and they apply to all the indices provided or matched by an index pattern.
- The option names and their values are the same as used by the
- <<search-search-api-query-params,Search API>>, however note that the default
- values may differ.
- The currently supported options are:
- include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
- +
- Defaults to `true`.
- // unlike "allow-no-indices", "index-ignore-unavailable" includes a default
- // in common-parms.asciidoc, which is different from QL's -- we need to
- // provide the full text here.
- `ignore_unavailable`::
- (Optional, Boolean) If `false`, the request returns an error if it targets a
- missing or closed index.
- +
- Defaults to `true`.
- include::{es-ref-dir}/search/search.asciidoc[tag=search-preference]
- *Examples*
- [source.merge.styled,esql]
- ----
- include::{esql-specs}/from.csv-spec[tag=convertFromDatetimeWithOptions]
- ----
- [%header.monospaced.styled,format=dsv,separator=|]
- |===
- include::{esql-specs}/from.csv-spec[tag=convertFromDatetimeWithOptions-result]
- |===
|