-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[DOCS] EQL: Document stringContains function
#54968
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 stringContains function
#54968
Conversation
|
Pinging @elastic/es-ql (:Query Languages/EQL) |
|
Pinging @elastic/es-docs (>docs) |
| stringContains("start regsvr32.exe", "") // returns false | ||
| // null handling | ||
| stringContains(null, "regsvr32") // returns null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based off the conversation today, null in any required input will lead to a null output
| stringContains(null, "regsvr32") // returns null | |
| stringContains(null, "regsvr32") // returns null | |
| stringContains(process.command_line, null) // returns null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Updated with 8bcb8f8.
astefan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Suggested, also, another example to add.
| // process.command_line = "start regsvr32.exe" | ||
| stringContains(process.command_line, "regsvr32") // returns true | ||
| stringContains(process.command_line, "start ") // returns true | ||
| stringContains(process.command_line, "explorer") // returns false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add one additional example, to show a less obvious usage: stringContains(process.path, process.name).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added with 5ccc198. Thanks!
Documents the EQL
stringContainsfunction.Relates to #54380 and #54136