-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Grok processor supports capturing multiple values for same field name #18799
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
Conversation
Signed-off-by: Binlong Gao <[email protected]>
Signed-off-by: Binlong Gao <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #18799 +/- ##
=========================================
Coverage 72.95% 72.96%
- Complexity 69804 69816 +12
=========================================
Files 5667 5667
Lines 320532 320582 +50
Branches 46397 46405 +8
=========================================
+ Hits 233847 233914 +67
+ Misses 67768 67706 -62
- Partials 18917 18962 +45 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Looks good to me. We call it capture_all_matches
, but if we have a pattern matching multiple groups (for example word1,word2,word3,
with pattern (%{WORD:word},)+
), it looks like we only retrieve word3
. We could highlight this in the docs later on.
This PR is stalled because it has been open for 30 days with no activity. |
Signed-off-by: Andrew Ross <[email protected]>
…opensearch-project#18799) * Grok processor supports capturing multiple values for same field name Signed-off-by: Binlong Gao <[email protected]> * Modify change log Signed-off-by: Binlong Gao <[email protected]> --------- Signed-off-by: Binlong Gao <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Co-authored-by: Andrew Ross <[email protected]>
…opensearch-project#18799) * Grok processor supports capturing multiple values for same field name Signed-off-by: Binlong Gao <[email protected]> * Modify change log Signed-off-by: Binlong Gao <[email protected]> --------- Signed-off-by: Binlong Gao <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Co-authored-by: Andrew Ross <[email protected]> Signed-off-by: Ankit Jain <[email protected]>
…opensearch-project#18799) * Grok processor supports capturing multiple values for same field name Signed-off-by: Binlong Gao <[email protected]> * Modify change log Signed-off-by: Binlong Gao <[email protected]> --------- Signed-off-by: Binlong Gao <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Co-authored-by: Andrew Ross <[email protected]> Signed-off-by: Ankit Jain <[email protected]>
…opensearch-project#18799) * Grok processor supports capturing multiple values for same field name Signed-off-by: Binlong Gao <[email protected]> * Modify change log Signed-off-by: Binlong Gao <[email protected]> --------- Signed-off-by: Binlong Gao <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Co-authored-by: Andrew Ross <[email protected]>
…opensearch-project#18799) * Grok processor supports capturing multiple values for same field name Signed-off-by: Binlong Gao <[email protected]> * Modify change log Signed-off-by: Binlong Gao <[email protected]> --------- Signed-off-by: Binlong Gao <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Co-authored-by: Andrew Ross <[email protected]>
…opensearch-project#18799) * Grok processor supports capturing multiple values for same field name Signed-off-by: Binlong Gao <[email protected]> * Modify change log Signed-off-by: Binlong Gao <[email protected]> --------- Signed-off-by: Binlong Gao <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Co-authored-by: Andrew Ross <[email protected]>
Description
Add an option
capture_all_matches
for the grok ingest processor, when set totrue
, all matched values for same field name will be collected into an array, by default, only the first the matched value will be captured.By checking the code:
OpenSearch/libs/grok/src/main/java/org/opensearch/grok/GrokCaptureType.java
Line 113 in 89edd4c
Related Issues
#18790
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.