diff --git a/libs/grok/build.gradle b/libs/grok/build.gradle index 87dc1b8b6184b..25e2a40fc8dbe 100644 --- a/libs/grok/build.gradle +++ b/libs/grok/build.gradle @@ -20,7 +20,7 @@ dependencies { compile 'org.jruby.joni:joni:2.1.6' // joni dependencies: - compile 'org.jruby.jcodings:jcodings:1.0.44' + compile 'org.jruby.jcodings:jcodings:1.0.12' testCompile(project(":test:framework")) { exclude group: 'org.elasticsearch', module: 'elasticsearch-grok' diff --git a/libs/grok/licenses/jcodings-1.0.12.jar.sha1 b/libs/grok/licenses/jcodings-1.0.12.jar.sha1 new file mode 100644 index 0000000000000..b097e32ece493 --- /dev/null +++ b/libs/grok/licenses/jcodings-1.0.12.jar.sha1 @@ -0,0 +1 @@ +6bc17079fcaa8823ea8cd0d4c66516335b558db8 \ No newline at end of file diff --git a/libs/grok/licenses/jcodings-1.0.44.jar.sha1 b/libs/grok/licenses/jcodings-1.0.44.jar.sha1 deleted file mode 100644 index 4449009d3395e..0000000000000 --- a/libs/grok/licenses/jcodings-1.0.44.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -a6884b2fd8fd9a56874db05afaa22435043a2e3e \ No newline at end of file diff --git a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/GrokProcessorTests.java b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/GrokProcessorTests.java index 68654923ae926..2b4c45a10272f 100644 --- a/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/GrokProcessorTests.java +++ b/modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/GrokProcessorTests.java @@ -45,6 +45,16 @@ public void testMatch() throws Exception { assertThat(doc.getFieldValue("one", String.class), equalTo("1")); } + public void testIgnoreCase() throws Exception { + String fieldName = RandomDocumentPicks.randomFieldName(random()); + IngestDocument doc = RandomDocumentPicks.randomIngestDocument(random(), new HashMap<>()); + doc.setFieldValue(fieldName, "A"); + GrokProcessor processor = new GrokProcessor(randomAlphaOfLength(10), Collections.emptyMap(), + Collections.singletonList("(?(?i)A)"), fieldName, false, false, ThreadWatchdog.noop()); + processor.execute(doc); + assertThat(doc.getFieldValue("a", String.class), equalTo("A")); + } + public void testNoMatch() { String fieldName = RandomDocumentPicks.randomFieldName(random()); IngestDocument doc = RandomDocumentPicks.randomIngestDocument(random(), new HashMap<>());