@@ -162,13 +162,17 @@ the operator uses a case-sensitive lexicographic order.
162
162
163
163
NOTE: `=` is not supported as an equal operator. Use `==` or `:` instead.
164
164
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
166
170
<<eql-syntax-logical-operators,logical operator>> between comparisons. For
167
171
example, `foo < bar <= baz` is not supported. However, you can rewrite the
168
172
expression as `foo < bar and bar <= baz`, which is supported.
169
173
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>>.
172
176
173
177
*Example* +
174
178
The following EQL query compares the `process.parent_name` field
@@ -217,24 +221,22 @@ Returns `true` if the condition to the right is `false`.
217
221
218
222
[source,eql]
219
223
----
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
225
231
----
226
232
227
233
`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~`.
232
236
233
237
`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~`.
238
240
239
241
`:` (case-insensitive)::
240
242
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.
814
816
* If the query includes <<eql-by-keyword,`by` fields>>, the query uses a
815
817
separate state machine for each unique `by` field value.
816
818
817
- .*Example*
819
+ .*Example*
818
820
[%collapsible]
819
821
====
820
822
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:
1024
1026
// | +-----------+ +-----------+ +------------+ |
1025
1027
// +------------------------------------------------------+
1026
1028
----
1027
-
1028
1029
====
0 commit comments