elasticsearch/docs/reference/esql/processing-commands/where.asciidoc
Abdon Pijpelink bc59315baa
[DOCS] Examples for ES|QL DISSECT and WHERE (#102591)
* DISSECT examples

* WHERE examples

* Remove references to empty keys

* Fix non-deterministic test
2023-11-27 10:56:48 +01:00

54 lines
No EOL
1 KiB
Text

[discrete]
[[esql-where]]
=== `WHERE`
**Syntax**
[source,esql]
----
WHERE expression
----
*Parameters*
`expression`::
A boolean expression.
*Description*
The `WHERE` processing command produces a table that contains all the rows from
the input table for which the provided condition evaluates to `true`.
*Examples*
[source,esql]
----
include::{esql-specs}/docs.csv-spec[tag=where]
----
Which, if `still_hired` is a boolean field, can be simplified to:
[source,esql]
----
include::{esql-specs}/docs.csv-spec[tag=whereBoolean]
----
`WHERE` supports various <<esql-functions,functions>>. For example the
<<esql-length>> function:
[source,esql]
----
include::{esql-specs}/docs.csv-spec[tag=whereFunction]
----
For a complete list of all functions, refer to <<esql-functions>>.
include::../functions/predicates.asciidoc[tag=body]
include::../functions/like.asciidoc[tag=body]
include::../functions/rlike.asciidoc[tag=body]
include::../functions/in.asciidoc[tag=body]
For a complete list of all operators, refer to <<esql-operators>>.