esql-index-options.asciidoc 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. [[esql-index-options]]
  2. === {esql} index options
  3. ++++
  4. <titleabbrev>Index options</titleabbrev>
  5. ++++
  6. The `OPTIONS` directive of the <<esql-from,FROM>> command allows configuring
  7. the way {esql} accesses the data to be queried. The argument passed to this
  8. directive is a comma-separated list of option name-value pairs, with the option
  9. name and the corresponding value double-quoted.
  10. [source,esql]
  11. ----
  12. FROM index_pattern [OPTIONS "option1"="value1"[,...[,"optionN"="valueN"]]]
  13. ----
  14. These options can only be provided as part of a <<esql-from,FROM>> command,
  15. and they apply to all the indices provided or matched by an index pattern.
  16. The option names and their values are the same as used by the
  17. <<search-search-api-query-params,Search API>>, however note that the default
  18. values may differ.
  19. The currently supported options are:
  20. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
  21. +
  22. Defaults to `true`.
  23. // unlike "allow-no-indices", "index-ignore-unavailable" includes a default
  24. // in common-parms.asciidoc, which is different from QL's -- we need to
  25. // provide the full text here.
  26. `ignore_unavailable`::
  27. (Optional, Boolean) If `false`, the request returns an error if it targets a
  28. missing or closed index.
  29. +
  30. Defaults to `true`.
  31. include::{es-repo-dir}/search/search.asciidoc[tag=search-preference]
  32. *Examples*
  33. [source.merge.styled,esql]
  34. ----
  35. include::{esql-specs}/from.csv-spec[tag=convertFromDatetimeWithOptions]
  36. ----
  37. [%header.monospaced.styled,format=dsv,separator=|]
  38. |===
  39. include::{esql-specs}/from.csv-spec[tag=convertFromDatetimeWithOptions-result]
  40. |===