From bde0137e071e7b4b5684f3a6018098989a4efd64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BCscher?= Date: Mon, 3 Jun 2019 13:36:20 +0200 Subject: [PATCH] Fix compile issue of earlier commit on 7.x --- .../plugin/analysis/stempel/AnalysisStempelPlugin.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/analysis-stempel/src/main/java/org/elasticsearch/plugin/analysis/stempel/AnalysisStempelPlugin.java b/plugins/analysis-stempel/src/main/java/org/elasticsearch/plugin/analysis/stempel/AnalysisStempelPlugin.java index a523d7dcaa0..1ba78e75c7c 100644 --- a/plugins/analysis-stempel/src/main/java/org/elasticsearch/plugin/analysis/stempel/AnalysisStempelPlugin.java +++ b/plugins/analysis-stempel/src/main/java/org/elasticsearch/plugin/analysis/stempel/AnalysisStempelPlugin.java @@ -29,6 +29,7 @@ import org.elasticsearch.indices.analysis.AnalysisModule.AnalysisProvider; import org.elasticsearch.plugins.AnalysisPlugin; import org.elasticsearch.plugins.Plugin; +import java.util.HashMap; import java.util.Map; import static java.util.Collections.singletonMap; @@ -36,8 +37,10 @@ import static java.util.Collections.singletonMap; public class AnalysisStempelPlugin extends Plugin implements AnalysisPlugin { @Override public Map> getTokenFilters() { - return Map.of("polish_stem", PolishStemTokenFilterFactory::new, - "polish_stop", PolishStopTokenFilterFactory::new); + Map> filters = new HashMap<>(); + filters.put("polish_stem", PolishStemTokenFilterFactory::new); + filters.put("polish_stop", PolishStopTokenFilterFactory::new); + return filters; } @Override