Grok processor supports capturing multiple values for same field name#18799
Merged
andrross merged 3 commits intoopensearch-project:mainfrom Sep 12, 2025
Merged
Grok processor supports capturing multiple values for same field name#18799andrross merged 3 commits intoopensearch-project:mainfrom
andrross merged 3 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
1 task
Contributor
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:
|
varunbharadwaj
approved these changes
Aug 12, 2025
Contributor
varunbharadwaj
left a comment
There was a problem hiding this comment.
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.
msfroh
approved these changes
Aug 12, 2025
Contributor
|
This PR is stalled because it has been open for 30 days with no activity. |
Signed-off-by: Andrew Ross <andrross@amazon.com>
Contributor
andrross
approved these changes
Sep 12, 2025
jainankitk
pushed a commit
to jainankitk/OpenSearch
that referenced
this pull request
Sep 22, 2025
…opensearch-project#18799) * Grok processor supports capturing multiple values for same field name Signed-off-by: Binlong Gao <gbinlong@amazon.com> * Modify change log Signed-off-by: Binlong Gao <gbinlong@amazon.com> --------- Signed-off-by: Binlong Gao <gbinlong@amazon.com> Signed-off-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com>
jainankitk
pushed a commit
to jainankitk/OpenSearch
that referenced
this pull request
Sep 22, 2025
…opensearch-project#18799) * Grok processor supports capturing multiple values for same field name Signed-off-by: Binlong Gao <gbinlong@amazon.com> * Modify change log Signed-off-by: Binlong Gao <gbinlong@amazon.com> --------- Signed-off-by: Binlong Gao <gbinlong@amazon.com> Signed-off-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Ankit Jain <jainankitk@apache.org>
jainankitk
pushed a commit
to jainankitk/OpenSearch
that referenced
this pull request
Sep 22, 2025
…opensearch-project#18799) * Grok processor supports capturing multiple values for same field name Signed-off-by: Binlong Gao <gbinlong@amazon.com> * Modify change log Signed-off-by: Binlong Gao <gbinlong@amazon.com> --------- Signed-off-by: Binlong Gao <gbinlong@amazon.com> Signed-off-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Ankit Jain <jainankitk@apache.org>
asimmahmood1
pushed a commit
to jainankitk/OpenSearch
that referenced
this pull request
Sep 23, 2025
…opensearch-project#18799) * Grok processor supports capturing multiple values for same field name Signed-off-by: Binlong Gao <gbinlong@amazon.com> * Modify change log Signed-off-by: Binlong Gao <gbinlong@amazon.com> --------- Signed-off-by: Binlong Gao <gbinlong@amazon.com> Signed-off-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com>
pranikum
pushed a commit
to pranikum/OpenSearch
that referenced
this pull request
Sep 23, 2025
…opensearch-project#18799) * Grok processor supports capturing multiple values for same field name Signed-off-by: Binlong Gao <gbinlong@amazon.com> * Modify change log Signed-off-by: Binlong Gao <gbinlong@amazon.com> --------- Signed-off-by: Binlong Gao <gbinlong@amazon.com> Signed-off-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com>
vinaykpud
pushed a commit
to vinaykpud/OpenSearch
that referenced
this pull request
Sep 26, 2025
…opensearch-project#18799) * Grok processor supports capturing multiple values for same field name Signed-off-by: Binlong Gao <gbinlong@amazon.com> * Modify change log Signed-off-by: Binlong Gao <gbinlong@amazon.com> --------- Signed-off-by: Binlong Gao <gbinlong@amazon.com> Signed-off-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com>
This was referenced Jan 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add an option
capture_all_matchesfor 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.