Skip to content

Commit 93a5eb0

Browse files
authored
[DOCS] EQL: Document size limit for pipes (#59085) (#59236)
Changes: * Documents the `size` default as `10`. * Updates `size` param def to note its relation to pipes. * Updates the `head` and `tail` pipe docs to modify sequences. * Documents the `fetch_size` parameter. Relates to #59014 and #59063
1 parent 17bd559 commit 93a5eb0

File tree

2 files changed

+31
-12
lines changed

2 files changed

+31
-12
lines changed

docs/reference/eql/eql-search-api.asciidoc

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,22 @@ Defaults to `event.category`, as defined in the {ecs-ref}/ecs-event.html[Elastic
160160
Common Schema (ECS)]. If an index does not contain the `event.category` field,
161161
this value is required.
162162

163+
`fetch_size`::
164+
(Optional, integer)
165+
Maximum number of events to search at a time for sequence queries. Defaults to
166+
`1000`.
167+
+
168+
This value must be greater than `2` but cannot exceed the value of the
169+
<<index-max-result-window,`index.max_result_window`>> setting, which defaults to
170+
`10000`.
171+
+
172+
Internally, a sequence query fetches and paginates sets of events to search for
173+
matches. This parameter controls the size of those sets. This parameter does not
174+
limit the total number of events searched or the number of matching events
175+
returned.
176+
+
177+
A greater `fetch_size` value often increases search speed but uses more memory.
178+
163179
`filter`::
164180
(Optional, <<query-dsl,query DSL object>>)
165181
Query, written in query DSL, used to filter the events on which the EQL query
@@ -231,7 +247,10 @@ return.
231247
For <<eql-sequences,sequence queries>>, the maximum number of matching sequences
232248
to return.
233249
+
234-
Defaults to `50`. This value must be greater than `0`.
250+
Defaults to `10`. This value must be greater than `0`.
251+
+
252+
NOTE: You cannot use <<eql-pipe-ref,pipes>>, such as `head` or `tail`, to exceed
253+
this value.
235254

236255
[[eql-search-api-tiebreaker-field]]
237256
`tiebreaker_field`::

docs/reference/eql/pipes.asciidoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ dev::[]
1717
[[eql-pipe-head]]
1818
=== `head`
1919

20-
Returns up to a specified number of events, starting with the earliest matching
21-
events. Works similarly to the
20+
Returns up to a specified number of events or sequences, starting with the
21+
earliest matches. Works similarly to the
2222
https://en.wikipedia.org/wiki/Head_(Unix)[Unix head command].
2323

2424
[%collapsible]
2525
====
2626
*Example*
2727
28-
The following EQL query returns up to fifty of the earliest powershell
28+
The following EQL query returns up to three of the earliest powershell
2929
commands.
3030
3131
[source,eql]
3232
----
3333
process where process.name == "powershell.exe"
34-
| head 50
34+
| head 3
3535
----
3636
3737
*Syntax*
@@ -44,28 +44,28 @@ head <max>
4444
4545
`<max>`::
4646
(Required, integer)
47-
Maximum number of matching events to return.
47+
Maximum number of matching events or sequences to return.
4848
====
4949

5050
[discrete]
5151
[[eql-pipe-tail]]
5252
=== `tail`
5353

54-
Returns up to a specified number of events, starting with the most recent
55-
matching events. Works similarly to the
54+
Returns up to a specified number of events or sequences, starting with the most
55+
recent matches. Works similarly to the
5656
https://en.wikipedia.org/wiki/Tail_(Unix)[Unix tail command].
5757

5858
[%collapsible]
5959
====
6060
*Example*
6161
62-
The following EQL query returns up to thirty of the most recent `svchost.exe`
62+
The following EQL query returns up to five of the most recent `svchost.exe`
6363
processes.
6464
6565
[source,eql]
6666
----
6767
process where process.name == "svchost.exe"
68-
| tail 30
68+
| tail 5
6969
----
7070
7171
*Syntax*
@@ -78,5 +78,5 @@ tail <max>
7878
7979
`<max>`::
8080
(Required, integer)
81-
Maximum number of matching events to return.
82-
====
81+
Maximum number of matching events or sequences to return.
82+
====

0 commit comments

Comments
 (0)