Skip to content

Fixes GrokProcessor's ignorance of named-captures with same name.#22131

Merged
talevy merged 1 commit intoelastic:masterfrom
talevy:fix-22117
Dec 13, 2016
Merged

Fixes GrokProcessor's ignorance of named-captures with same name.#22131
talevy merged 1 commit intoelastic:masterfrom
talevy:fix-22117

Conversation

@talevy
Copy link
Copy Markdown
Contributor

@talevy talevy commented Dec 13, 2016

Grok was originally ignoring potential matches to named-capture groups
larger than one. For example, If you had two patterns containing the
same named field, but only the second pattern matched, it would fail to
pick this up.

This PR fixes this by exploring all potential places where a
named-capture was used and chooses the first one that matched.

Fixes #22117.

@talevy talevy added :Distributed/Ingest Node Execution or management of Ingest Pipelines >bug v5.2.0 v6.0.0-alpha1 labels Dec 13, 2016
Grok was originally ignoring potential matches to named-capture groups
larger than one. For example, If you had two patterns containing the
same named field, but only the second pattern matched, it would fail to
pick this up.

This PR fixes this by exploring all potential places where a
named-capture was used and chooses the first one that matched.

Fixes elastic#22117.
Copy link
Copy Markdown
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM

@talevy
Copy link
Copy Markdown
Contributor Author

talevy commented Dec 13, 2016

thanks!

@talevy talevy merged commit f56097b into elastic:master Dec 13, 2016
@talevy talevy deleted the fix-22117 branch December 13, 2016 21:20
talevy added a commit that referenced this pull request Dec 13, 2016
…2131)

Grok was originally ignoring potential matches to named-capture groups
larger than one. For example, If you had two patterns containing the
same named field, but only the second pattern matched, it would fail to
pick this up.

This PR fixes this by exploring all potential places where a
named-capture was used and chooses the first one that matched.

Fixes #22117.
@clintongormley
Copy link
Copy Markdown
Contributor

thanks @talevy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Distributed/Ingest Node Execution or management of Ingest Pipelines v5.2.0 v6.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ingest Node's grok can't set the same field from two patterns

3 participants