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