Skip to content

Commit

Permalink
Be more lenient with fieldnames in Grok Processor (elastic#21745)
Browse files Browse the repository at this point in the history
  • Loading branch information
original-brownbear committed Jun 29, 2018
1 parent 5318e38 commit 125933b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,9 @@ public void testExponentialExpressions() {
}

public void testUnicodeFieldnames() {
for(String fieldName : Arrays.asList("@metadata", "@metädata", "@metädat[a]")) {
for (String fieldName : Arrays.asList("@metadata", "@metädata", "@metädat[a]",
randomAlphaOfLengthBetween(1, 5), String.valueOf(randomIntBetween(0, 100)),
randomAlphaOfLengthBetween(1, 5) + randomIntBetween(0, 100))) {
String line = "foo";
Grok grok = new Grok(basePatterns, "%{WORD:" + fieldName + "}");
Map<String, Object> matches = grok.captures(line);
Expand Down

0 comments on commit 125933b

Please sign in to comment.