Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] EQL: Document runs keyword #78478

Merged
merged 7 commits into from
Sep 30, 2021
Merged

[DOCS] EQL: Document runs keyword #78478

merged 7 commits into from
Sep 30, 2021

Conversation

jrodewig
Copy link
Contributor

@jrodewig jrodewig commented Sep 29, 2021

Documents the runs keyword for running the same event criteria successively in a sequence query.

Relates to #75082.

Targeting 7.x to include the release highlight. I'll remove the highlight from the 8.0/master port.

Preview

@jrodewig jrodewig changed the title [DOCS] Document runs keyword [DOCS] EQL: Document runs keyword Sep 29, 2021
Documents the `runs` keyword for repeating events in a sequence query.

Relates to #75082.
@jrodewig jrodewig marked this pull request as ready for review September 29, 2021 19:33
@jrodewig jrodewig added :Analytics/EQL EQL querying >docs General docs changes labels Sep 29, 2021
@elasticmachine elasticmachine added Team:Docs Meta label for docs team Team:QL (Deprecated) Meta label for query languages team labels Sep 29, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-ql (Team:QL)

@jrodewig jrodewig added v8.0.0 and removed Team:Docs Meta label for docs team Team:QL (Deprecated) Meta label for query languages team labels Sep 29, 2021
@costin
Copy link
Member

costin commented Sep 30, 2021

Use a runs statement to repeat an event within a sequence query. For example:

This statement is unclear since it suggests a matching event is going to be repeated in the response, which is not the case.
Rather when trying to match an event that occurs multiple times in succession, to avoid having to redeclare a query filter multiple times, one can use the runs option to indicate how many times said statement should run.
It is syntactic sugar so that instead of writing:

sequence
 [queryA]
 [queryB]
 [queryB]

one can write

sequence
  [queryA]
  [queryB] [runs=2]

@jrodewig
Copy link
Contributor Author

Thanks for the feedback @costin. I've pushed some changes to clarify the wording based on your feedback.

Let me know if any further changes are needed.

@jrodewig jrodewig requested a review from costin September 30, 2021 13:18
@costin
Copy link
Member

costin commented Sep 30, 2021

LGTM. The only remark is criteria is the plural for criterion so the first paragraph should read:
"the same event criteria criterion"

Copy link
Member

@costin costin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jrodewig
Copy link
Contributor Author

Thanks @costin!

LGTM. The only remark is criteria is the plural for criterion so the first paragraph should read:
"the same event criteria criterion"

IMO the event category and event condition(s) are each a criterion. The "criteria" here is a set that consists of those components. It's certainly debatable tho.

@jrodewig jrodewig merged commit 22db8a0 into elastic:7.x Sep 30, 2021
@jrodewig jrodewig deleted the docs__eql-runs-keyword branch September 30, 2021 14:08
elasticsearchmachine pushed a commit that referenced this pull request Sep 30, 2021
Documents the `runs` keyword for running the same event criteria successively in a sequence query.

Relates to #75082.

# Conflicts:
#	docs/reference/release-notes/highlights.asciidoc
@jakelandis jakelandis removed the v8.0.0 label Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/EQL EQL querying >docs General docs changes v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants