-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
x-pack/winlogbeat/module/powershell: don't split tokens on hyphen #28483
Conversation
f118352
to
4c19dbc
Compare
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
I opened an issue to discuss custom analyzer support in Beats at #28540. |
This pull request is now in conflicts. Could you fix it? 🙏
|
4c19dbc
to
582fac2
Compare
582fac2
to
5997d97
Compare
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
search_analyzer: | ||
winlogbeat_powershell_script_analyzer: | ||
type: pattern | ||
pattern: "[\\W&&[^-]]+" |
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.
Just a note. I duplicated the definition in the search analyzer although this is not required since the analyzers are collated during the fields walk. It is included for clarity — though I'm not sure it achieves that.
What does this PR do?
The change replaces the simple tokenizer with a custom tokenizer that splits on word boundaries that do not include hyphen.
Why is it important?
The current tokenizer splits powershell language tokens given incorrect search results.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Related issues
Use cases
N/A
Screenshots
N/A
Logs
N/A