Skip to content

Commit 293fcd4

Browse files
authored
[DOCS] EQL: Minor doc fixes (#68927)
1 parent 0e504b0 commit 293fcd4

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

docs/reference/eql/syntax.asciidoc

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,17 @@ the operator uses a case-sensitive lexicographic order.
162162

163163
NOTE: `=` is not supported as an equal operator. Use `==` or `:` instead.
164164

165-
You cannot chain comparison operators. Instead, use a
165+
[discrete]
166+
[[limitations-for-comparisons]]
167+
=== Limitations for comparisons
168+
169+
You cannot chain comparisons. Instead, use a
166170
<<eql-syntax-logical-operators,logical operator>> between comparisons. For
167171
example, `foo < bar <= baz` is not supported. However, you can rewrite the
168172
expression as `foo < bar and bar <= baz`, which is supported.
169173

170-
You also cannot use comparison operators to compare a field to another field.
171-
This applies even if the fields are changed using a <<eql-functions,function>>.
174+
You also cannot compare a field to another field, even if the fields are changed
175+
using a <<eql-functions,function>>.
172176

173177
*Example* +
174178
The following EQL query compares the `process.parent_name` field
@@ -217,24 +221,22 @@ Returns `true` if the condition to the right is `false`.
217221

218222
[source,eql]
219223
----
220-
user.name in ("Administrator", "SYSTEM", "NETWORK SERVICE")
221-
user.name in~ ("administrator", "system", "network service")
222-
user.name not in ("Administrator", "SYSTEM", "NETWORK SERVICE")
223-
user.name not in~ ("administrator", "system", "network service")
224-
user.name : ("administrator", "system", "network service")
224+
my_field in ("Foo", "BAR", "BAZ") // case-sensitive
225+
my_field in~ ("foo", "bar", "baz") // case-insensitive
226+
227+
my_field not in ("Foo", "BAR", "BAZ") // case-sensitive
228+
my_field not in~ ("foo", "bar", "baz") // case-insensitive
229+
230+
my_field : ("foo", "bar", "baz") // case-insensitive
225231
----
226232

227233
`in` (case-sensitive)::
228-
Returns `true` if the value is contained in the provided list.
229-
230-
`in~` (case-insensitive)::
231-
Returns `true` if the value is contained in the provided list.
234+
Returns `true` if the value is contained in the provided list. For
235+
case-insensitive matching, use `in~`.
232236

233237
`not in` (case-sensitive)::
234-
Returns `true` if the value is not contained in the provided list.
235-
236-
`not in~` (case-insensitive)::
237-
Returns `true` if the value is not contained in the provided list.
238+
Returns `true` if the value is not contained in the provided list. For
239+
case-insensitive matching, use `not in~`.
238240

239241
`:` (case-insensitive)::
240242
Returns `true` if the string is contained in the provided list. Can only be used
@@ -814,7 +816,7 @@ recent sequence overwrites the older one.
814816
* If the query includes <<eql-by-keyword,`by` fields>>, the query uses a
815817
separate state machine for each unique `by` field value.
816818

817-
.*Example*
819+
.*Example*
818820
[%collapsible]
819821
====
820822
A data set contains the following `process` events in ascending chronological
@@ -1024,5 +1026,4 @@ Pending sequence matches move through each machine's states as follows:
10241026
// | +-----------+ +-----------+ +------------+ |
10251027
// +------------------------------------------------------+
10261028
----
1027-
10281029
====

0 commit comments

Comments
 (0)