From 02568210bafae6d0e5af49e3020fb405f327e15a Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Tue, 28 Jun 2022 12:13:36 +0200 Subject: [PATCH] Don't extend AbstractIndexComponent in AbstractTokenFilter (#88113) No need for this extension, we don't make use of the settings or deprecation logger in production any more. Also, this slows down CS operations that require a temporary index service which builds quite a bit slower when the loggers need to be set up via reflective calls. --- .../ASCIIFoldingTokenFilterFactory.java | 2 +- ...bstractCompoundWordTokenFilterFactory.java | 2 +- .../common/ApostropheFilterFactory.java | 2 +- .../ArabicNormalizationFilterFactory.java | 2 +- .../common/ArabicStemTokenFilterFactory.java | 2 +- .../BengaliNormalizationFilterFactory.java | 2 +- .../BrazilianStemTokenFilterFactory.java | 2 +- .../common/CJKBigramFilterFactory.java | 2 +- .../common/CJKWidthFilterFactory.java | 2 +- .../analysis/common/ClassicFilterFactory.java | 2 +- .../common/CommonGramsTokenFilterFactory.java | 2 +- .../common/CzechStemTokenFilterFactory.java | 2 +- .../common/DecimalDigitFilterFactory.java | 2 +- .../DelimitedPayloadTokenFilterFactory.java | 2 +- .../common/DutchStemTokenFilterFactory.java | 2 +- .../common/EdgeNGramTokenFilterFactory.java | 2 +- .../common/ElisionTokenFilterFactory.java | 2 +- .../common/FingerprintTokenFilterFactory.java | 2 +- .../FlattenGraphTokenFilterFactory.java | 2 +- .../common/FrenchStemTokenFilterFactory.java | 2 +- .../GermanNormalizationFilterFactory.java | 2 +- .../common/GermanStemTokenFilterFactory.java | 2 +- .../HindiNormalizationFilterFactory.java | 2 +- .../IndicNormalizationFilterFactory.java | 2 +- .../common/KStemTokenFilterFactory.java | 2 +- .../common/KeepTypesFilterFactory.java | 2 +- .../common/KeepWordFilterFactory.java | 2 +- .../KeywordMarkerTokenFilterFactory.java | 2 +- .../common/LengthTokenFilterFactory.java | 2 +- .../common/LimitTokenCountFilterFactory.java | 2 +- .../common/LowerCaseTokenFilterFactory.java | 2 +- .../common/MinHashTokenFilterFactory.java | 2 +- .../common/MultiplexerTokenFilterFactory.java | 2 +- .../common/NGramTokenFilterFactory.java | 2 +- ...PatternCaptureGroupTokenFilterFactory.java | 2 +- .../PatternReplaceTokenFilterFactory.java | 2 +- .../PersianNormalizationFilterFactory.java | 2 +- .../common/PorterStemTokenFilterFactory.java | 2 +- .../PredicateTokenFilterScriptFactory.java | 2 +- .../RemoveDuplicatesTokenFilterFactory.java | 2 +- .../common/ReverseTokenFilterFactory.java | 2 +- .../common/RussianStemTokenFilterFactory.java | 2 +- .../ScandinavianFoldingFilterFactory.java | 2 +- ...candinavianNormalizationFilterFactory.java | 2 +- .../ScriptedConditionTokenFilterFactory.java | 2 +- .../SerbianNormalizationFilterFactory.java | 2 +- .../common/SnowballTokenFilterFactory.java | 2 +- .../SoraniNormalizationFilterFactory.java | 2 +- .../StemmerOverrideTokenFilterFactory.java | 2 +- .../common/StemmerTokenFilterFactory.java | 2 +- .../common/SynonymTokenFilterFactory.java | 2 +- .../common/TrimTokenFilterFactory.java | 2 +- .../common/TruncateTokenFilterFactory.java | 2 +- .../common/UniqueTokenFilterFactory.java | 2 +- .../common/UpperCaseTokenFilterFactory.java | 2 +- .../WordDelimiterGraphTokenFilterFactory.java | 2 +- .../WordDelimiterTokenFilterFactory.java | 2 +- .../icu/IcuCollationTokenFilterFactory.java | 2 +- .../icu/IcuFoldingTokenFilterFactory.java | 2 +- .../icu/IcuNormalizerTokenFilterFactory.java | 2 +- .../icu/IcuTransformTokenFilterFactory.java | 2 +- .../JapaneseStopTokenFilterFactory.java | 2 +- .../KuromojiBaseFormFilterFactory.java | 2 +- .../KuromojiCompletionFilterFactory.java | 2 +- .../KuromojiKatakanaStemmerFactory.java | 2 +- .../kuromoji/KuromojiNumberFilterFactory.java | 2 +- .../KuromojiPartOfSpeechFilterFactory.java | 2 +- .../KuromojiReadingFormFilterFactory.java | 2 +- .../nori/NoriNumberFilterFactory.java | 2 +- .../NoriPartOfSpeechStopFilterFactory.java | 2 +- .../nori/NoriReadingFormFilterFactory.java | 2 +- .../phonetic/PhoneticTokenFilterFactory.java | 2 +- .../SmartChineseNoOpTokenFilterFactory.java | 2 +- .../SmartChineseStopTokenFilterFactory.java | 2 +- .../pl/PolishStemTokenFilterFactory.java | 2 +- .../pl/PolishStopTokenFilterFactory.java | 2 +- .../indices/recovery/IndexRecoveryIT.java | 2 +- .../analysis/AbstractTokenFilterFactory.java | 7 +- .../analysis/HunspellTokenFilterFactory.java | 2 +- .../analysis/ShingleTokenFilterFactory.java | 5 +- .../analysis/StopTokenFilterFactory.java | 2 +- .../indices/analysis/AnalysisModule.java | 2 +- .../indices/TransportAnalyzeActionTests.java | 37 +---- .../index/analysis/AnalysisRegistryTests.java | 140 +----------------- .../ReloadableCustomAnalyzerTests.java | 13 +- .../mapper/TextFieldAnalyzerModeTests.java | 2 +- .../analysis/MyFilterTokenFilterFactory.java | 2 +- 87 files changed, 94 insertions(+), 272 deletions(-) diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ASCIIFoldingTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ASCIIFoldingTokenFilterFactory.java index 1fff166eb53b5..c7aff01a1ba14 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ASCIIFoldingTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ASCIIFoldingTokenFilterFactory.java @@ -29,7 +29,7 @@ public class ASCIIFoldingTokenFilterFactory extends AbstractTokenFilterFactory i private final boolean preserveOriginal; public ASCIIFoldingTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); preserveOriginal = settings.getAsBoolean(PRESERVE_ORIGINAL.getPreferredName(), DEFAULT_PRESERVE_ORIGINAL); } diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/AbstractCompoundWordTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/AbstractCompoundWordTokenFilterFactory.java index 5945a3787f776..6ec3f9fdcb087 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/AbstractCompoundWordTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/AbstractCompoundWordTokenFilterFactory.java @@ -29,7 +29,7 @@ public abstract class AbstractCompoundWordTokenFilterFactory extends AbstractTok protected final CharArraySet wordList; protected AbstractCompoundWordTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); minWordSize = settings.getAsInt("min_word_size", CompoundWordTokenFilterBase.DEFAULT_MIN_WORD_SIZE); minSubwordSize = settings.getAsInt("min_subword_size", CompoundWordTokenFilterBase.DEFAULT_MIN_SUBWORD_SIZE); diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ApostropheFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ApostropheFilterFactory.java index 590a46b0153d9..f9a50b5918b69 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ApostropheFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ApostropheFilterFactory.java @@ -20,7 +20,7 @@ public class ApostropheFilterFactory extends AbstractTokenFilterFactory { ApostropheFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ArabicNormalizationFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ArabicNormalizationFilterFactory.java index 282e0e61c1827..bfa3c05a27bea 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ArabicNormalizationFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ArabicNormalizationFilterFactory.java @@ -18,7 +18,7 @@ public class ArabicNormalizationFilterFactory extends AbstractTokenFilterFactory implements NormalizingTokenFilterFactory { ArabicNormalizationFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ArabicStemTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ArabicStemTokenFilterFactory.java index 9e496bc8d91b7..d23d3fd6129bb 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ArabicStemTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ArabicStemTokenFilterFactory.java @@ -18,7 +18,7 @@ public class ArabicStemTokenFilterFactory extends AbstractTokenFilterFactory { ArabicStemTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/BengaliNormalizationFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/BengaliNormalizationFilterFactory.java index 28765099c97bc..7fc1a6f3bee8a 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/BengaliNormalizationFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/BengaliNormalizationFilterFactory.java @@ -21,7 +21,7 @@ public class BengaliNormalizationFilterFactory extends AbstractTokenFilterFactory implements NormalizingTokenFilterFactory { BengaliNormalizationFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/BrazilianStemTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/BrazilianStemTokenFilterFactory.java index bbd5bd3138e03..392245a9e6198 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/BrazilianStemTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/BrazilianStemTokenFilterFactory.java @@ -23,7 +23,7 @@ public class BrazilianStemTokenFilterFactory extends AbstractTokenFilterFactory private final CharArraySet exclusions; BrazilianStemTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.exclusions = Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET); } diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CJKBigramFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CJKBigramFilterFactory.java index c7b47f4aa7892..a5db0c4bcb6a6 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CJKBigramFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CJKBigramFilterFactory.java @@ -43,7 +43,7 @@ public final class CJKBigramFilterFactory extends AbstractTokenFilterFactory { @SuppressWarnings("HiddenField") CJKBigramFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); outputUnigrams = settings.getAsBoolean("output_unigrams", false); final List asArray = settings.getAsList("ignored_scripts"); Set scripts = new HashSet<>(Arrays.asList("han", "hiragana", "katakana", "hangul")); diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CJKWidthFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CJKWidthFilterFactory.java index a4bcbe360251a..a85247279747e 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CJKWidthFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CJKWidthFilterFactory.java @@ -19,7 +19,7 @@ public final class CJKWidthFilterFactory extends AbstractTokenFilterFactory implements NormalizingTokenFilterFactory { CJKWidthFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ClassicFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ClassicFilterFactory.java index eb7658fed1274..bc86b8f56d09f 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ClassicFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ClassicFilterFactory.java @@ -20,7 +20,7 @@ public class ClassicFilterFactory extends AbstractTokenFilterFactory { ClassicFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CommonGramsTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CommonGramsTokenFilterFactory.java index 1da02b9aa44b1..a93c57c0f1c37 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CommonGramsTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CommonGramsTokenFilterFactory.java @@ -28,7 +28,7 @@ public class CommonGramsTokenFilterFactory extends AbstractTokenFilterFactory { private final boolean queryMode; CommonGramsTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.ignoreCase = settings.getAsBoolean("ignore_case", false); this.queryMode = settings.getAsBoolean("query_mode", false); this.words = Analysis.parseCommonWords(env, settings, null, ignoreCase); diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CzechStemTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CzechStemTokenFilterFactory.java index a07b2c7c8ffc8..7a7a09a9b0912 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CzechStemTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/CzechStemTokenFilterFactory.java @@ -17,7 +17,7 @@ public class CzechStemTokenFilterFactory extends AbstractTokenFilterFactory { CzechStemTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/DecimalDigitFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/DecimalDigitFilterFactory.java index e21846b60ee14..35f1803b79421 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/DecimalDigitFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/DecimalDigitFilterFactory.java @@ -22,7 +22,7 @@ public final class DecimalDigitFilterFactory extends AbstractTokenFilterFactory implements NormalizingTokenFilterFactory { DecimalDigitFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/DelimitedPayloadTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/DelimitedPayloadTokenFilterFactory.java index fd3d7091e66ee..5f266d1517893 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/DelimitedPayloadTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/DelimitedPayloadTokenFilterFactory.java @@ -31,7 +31,7 @@ public class DelimitedPayloadTokenFilterFactory extends AbstractTokenFilterFacto private final PayloadEncoder encoder; DelimitedPayloadTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); String delimiterConf = settings.get(DELIMITER); if (delimiterConf != null) { delimiter = delimiterConf.charAt(0); diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/DutchStemTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/DutchStemTokenFilterFactory.java index 15f1d664f72b8..9fdbeea7e7d16 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/DutchStemTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/DutchStemTokenFilterFactory.java @@ -24,7 +24,7 @@ public class DutchStemTokenFilterFactory extends AbstractTokenFilterFactory { private final CharArraySet exclusions; DutchStemTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.exclusions = Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET); } diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/EdgeNGramTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/EdgeNGramTokenFilterFactory.java index 56bd8c8e48631..62986f7732437 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/EdgeNGramTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/EdgeNGramTokenFilterFactory.java @@ -30,7 +30,7 @@ public class EdgeNGramTokenFilterFactory extends AbstractTokenFilterFactory { private static final String PRESERVE_ORIG_KEY = "preserve_original"; EdgeNGramTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.minGram = settings.getAsInt("min_gram", 1); this.maxGram = settings.getAsInt("max_gram", 2); this.side = parseSide(settings.get("side", "front")); diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ElisionTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ElisionTokenFilterFactory.java index 9c236002fe547..52d9898934c37 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ElisionTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ElisionTokenFilterFactory.java @@ -23,7 +23,7 @@ public class ElisionTokenFilterFactory extends AbstractTokenFilterFactory implem private final CharArraySet articles; ElisionTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.articles = Analysis.parseArticles(env, settings); if (this.articles == null) { throw new IllegalArgumentException("elision filter requires [articles] or [articles_path] setting"); diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/FingerprintTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/FingerprintTokenFilterFactory.java index f3429062b970e..daded81ea56b5 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/FingerprintTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/FingerprintTokenFilterFactory.java @@ -25,7 +25,7 @@ public class FingerprintTokenFilterFactory extends AbstractTokenFilterFactory { private final int maxOutputSize; FingerprintTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.separator = FingerprintAnalyzerProvider.parseSeparator(settings); this.maxOutputSize = settings.getAsInt(MAX_OUTPUT_SIZE.getPreferredName(), DEFAULT_MAX_OUTPUT_SIZE); } diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/FlattenGraphTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/FlattenGraphTokenFilterFactory.java index e8005bbf0feb6..6a65eadcd9118 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/FlattenGraphTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/FlattenGraphTokenFilterFactory.java @@ -18,7 +18,7 @@ public class FlattenGraphTokenFilterFactory extends AbstractTokenFilterFactory { FlattenGraphTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/FrenchStemTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/FrenchStemTokenFilterFactory.java index a35a6fd94da9b..65ff7a6488c3b 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/FrenchStemTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/FrenchStemTokenFilterFactory.java @@ -24,7 +24,7 @@ public class FrenchStemTokenFilterFactory extends AbstractTokenFilterFactory { private final CharArraySet exclusions; FrenchStemTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.exclusions = Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET); } diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/GermanNormalizationFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/GermanNormalizationFilterFactory.java index 93d1fd696dd28..3d0473a9ad134 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/GermanNormalizationFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/GermanNormalizationFilterFactory.java @@ -21,7 +21,7 @@ public class GermanNormalizationFilterFactory extends AbstractTokenFilterFactory implements NormalizingTokenFilterFactory { GermanNormalizationFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/GermanStemTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/GermanStemTokenFilterFactory.java index 557c73a152417..4474833d748bf 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/GermanStemTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/GermanStemTokenFilterFactory.java @@ -23,7 +23,7 @@ public class GermanStemTokenFilterFactory extends AbstractTokenFilterFactory { private final CharArraySet exclusions; GermanStemTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.exclusions = Analysis.parseStemExclusion(settings, CharArraySet.EMPTY_SET); } diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/HindiNormalizationFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/HindiNormalizationFilterFactory.java index 5e0d7fb857c49..35fa6e9f3c92c 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/HindiNormalizationFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/HindiNormalizationFilterFactory.java @@ -21,7 +21,7 @@ public class HindiNormalizationFilterFactory extends AbstractTokenFilterFactory implements NormalizingTokenFilterFactory { HindiNormalizationFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/IndicNormalizationFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/IndicNormalizationFilterFactory.java index c75758468db1a..cd52345a12e25 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/IndicNormalizationFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/IndicNormalizationFilterFactory.java @@ -21,7 +21,7 @@ public class IndicNormalizationFilterFactory extends AbstractTokenFilterFactory implements NormalizingTokenFilterFactory { IndicNormalizationFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KStemTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KStemTokenFilterFactory.java index 916e6101d8049..eca004dd45bb9 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KStemTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KStemTokenFilterFactory.java @@ -18,7 +18,7 @@ public class KStemTokenFilterFactory extends AbstractTokenFilterFactory { KStemTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KeepTypesFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KeepTypesFilterFactory.java index b76b4cc96fb9d..bc1587a4fc66f 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KeepTypesFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KeepTypesFilterFactory.java @@ -69,7 +69,7 @@ private static KeepTypesMode fromString(String modeString) { } KeepTypesFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); final List arrayKeepTypes = settings.getAsList(KEEP_TYPES_KEY, null); if ((arrayKeepTypes == null)) { diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KeepWordFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KeepWordFilterFactory.java index 9e6dfb6c8768f..070f0f038f29e 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KeepWordFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KeepWordFilterFactory.java @@ -50,7 +50,7 @@ public class KeepWordFilterFactory extends AbstractTokenFilterFactory { private static final String ENABLE_POS_INC_KEY = "enable_position_increments"; KeepWordFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); final List arrayKeepWords = settings.getAsList(KEEP_WORDS_KEY, null); final String keepWordsPath = settings.get(KEEP_WORDS_PATH_KEY, null); diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KeywordMarkerTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KeywordMarkerTokenFilterFactory.java index 274081cb5e345..de44dbff88d27 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KeywordMarkerTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/KeywordMarkerTokenFilterFactory.java @@ -44,7 +44,7 @@ public class KeywordMarkerTokenFilterFactory extends AbstractTokenFilterFactory private final AnalysisMode analysisMode; KeywordMarkerTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); boolean ignoreCase = settings.getAsBoolean("ignore_case", false); String patternString = settings.get("keywords_pattern"); diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/LengthTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/LengthTokenFilterFactory.java index cacdbf39da240..f38fa6b4b2982 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/LengthTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/LengthTokenFilterFactory.java @@ -24,7 +24,7 @@ public class LengthTokenFilterFactory extends AbstractTokenFilterFactory { private static final String ENABLE_POS_INC_KEY = "enable_position_increments"; LengthTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); min = settings.getAsInt("min", 0); max = settings.getAsInt("max", Integer.MAX_VALUE); if (settings.get(ENABLE_POS_INC_KEY) != null) { diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/LimitTokenCountFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/LimitTokenCountFilterFactory.java index 295c68e2b6151..b83be77243f79 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/LimitTokenCountFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/LimitTokenCountFilterFactory.java @@ -24,7 +24,7 @@ public class LimitTokenCountFilterFactory extends AbstractTokenFilterFactory { private final boolean consumeAllTokens; LimitTokenCountFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.maxTokenCount = settings.getAsInt("max_token_count", DEFAULT_MAX_TOKEN_COUNT); this.consumeAllTokens = settings.getAsBoolean("consume_all_tokens", DEFAULT_CONSUME_ALL_TOKENS); } diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/LowerCaseTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/LowerCaseTokenFilterFactory.java index 448f7ad41dfa3..9d6bb37cdf540 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/LowerCaseTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/LowerCaseTokenFilterFactory.java @@ -33,7 +33,7 @@ public class LowerCaseTokenFilterFactory extends AbstractTokenFilterFactory impl private final String lang; LowerCaseTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.lang = settings.get("language", null); } diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/MinHashTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/MinHashTokenFilterFactory.java index a87f7aac58ed1..2d4da603b851c 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/MinHashTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/MinHashTokenFilterFactory.java @@ -27,7 +27,7 @@ public class MinHashTokenFilterFactory extends AbstractTokenFilterFactory { private final MinHashFilterFactory minHashFilterFactory; MinHashTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); minHashFilterFactory = new MinHashFilterFactory(convertSettings(settings)); } diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/MultiplexerTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/MultiplexerTokenFilterFactory.java index 51f8b6a6076bd..ad0881b300b5b 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/MultiplexerTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/MultiplexerTokenFilterFactory.java @@ -34,7 +34,7 @@ public class MultiplexerTokenFilterFactory extends AbstractTokenFilterFactory { private final boolean preserveOriginal; public MultiplexerTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) throws IOException { - super(indexSettings, name, settings); + super(name, settings); this.filterNames = settings.getAsList("filters"); this.preserveOriginal = settings.getAsBoolean("preserve_original", true); } diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/NGramTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/NGramTokenFilterFactory.java index c929b4710bf49..31afa780f27e3 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/NGramTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/NGramTokenFilterFactory.java @@ -23,7 +23,7 @@ public class NGramTokenFilterFactory extends AbstractTokenFilterFactory { private static final String PRESERVE_ORIG_KEY = "preserve_original"; NGramTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); int maxAllowedNgramDiff = indexSettings.getMaxNgramDiff(); this.minGram = settings.getAsInt("min_gram", 1); this.maxGram = settings.getAsInt("max_gram", 2); diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PatternCaptureGroupTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PatternCaptureGroupTokenFilterFactory.java index 9af3f280c0f89..092a80b86dfd0 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PatternCaptureGroupTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PatternCaptureGroupTokenFilterFactory.java @@ -25,7 +25,7 @@ public class PatternCaptureGroupTokenFilterFactory extends AbstractTokenFilterFa private static final String PRESERVE_ORIG_KEY = "preserve_original"; PatternCaptureGroupTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); List regexes = settings.getAsList(PATTERNS_KEY, null, false); if (regexes == null) { throw new IllegalArgumentException("required setting '" + PATTERNS_KEY + "' is missing for token filter [" + name + "]"); diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PatternReplaceTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PatternReplaceTokenFilterFactory.java index e62b71428135e..34016f0385d0f 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PatternReplaceTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PatternReplaceTokenFilterFactory.java @@ -25,7 +25,7 @@ public class PatternReplaceTokenFilterFactory extends AbstractTokenFilterFactory private final boolean all; public PatternReplaceTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); String sPattern = settings.get("pattern", null); if (sPattern == null) { diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PersianNormalizationFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PersianNormalizationFilterFactory.java index 5cd0f4d2c3e17..813ab6e237e8a 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PersianNormalizationFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PersianNormalizationFilterFactory.java @@ -18,7 +18,7 @@ public class PersianNormalizationFilterFactory extends AbstractTokenFilterFactory implements NormalizingTokenFilterFactory { PersianNormalizationFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PorterStemTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PorterStemTokenFilterFactory.java index 0bd480064a8cc..84c0534d43000 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PorterStemTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PorterStemTokenFilterFactory.java @@ -18,7 +18,7 @@ public class PorterStemTokenFilterFactory extends AbstractTokenFilterFactory { PorterStemTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PredicateTokenFilterScriptFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PredicateTokenFilterScriptFactory.java index 848a2f731ddf1..8ffc6a6cc83c2 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PredicateTokenFilterScriptFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PredicateTokenFilterScriptFactory.java @@ -28,7 +28,7 @@ public class PredicateTokenFilterScriptFactory extends AbstractTokenFilterFactor private final AnalysisPredicateScript.Factory factory; public PredicateTokenFilterScriptFactory(IndexSettings indexSettings, String name, Settings settings, ScriptService scriptService) { - super(indexSettings, name, settings); + super(name, settings); Settings scriptSettings = settings.getAsSettings("script"); Script script = Script.parse(scriptSettings); if (script.getType() != ScriptType.INLINE) { diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/RemoveDuplicatesTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/RemoveDuplicatesTokenFilterFactory.java index 710bd47508324..c7389338af662 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/RemoveDuplicatesTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/RemoveDuplicatesTokenFilterFactory.java @@ -21,7 +21,7 @@ class RemoveDuplicatesTokenFilterFactory extends AbstractTokenFilterFactory { RemoveDuplicatesTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ReverseTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ReverseTokenFilterFactory.java index d4b5834a73750..d1fb6caa1abf2 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ReverseTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ReverseTokenFilterFactory.java @@ -18,7 +18,7 @@ public class ReverseTokenFilterFactory extends AbstractTokenFilterFactory { ReverseTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/RussianStemTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/RussianStemTokenFilterFactory.java index 5d1135ecd7307..24074d29a33e2 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/RussianStemTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/RussianStemTokenFilterFactory.java @@ -18,7 +18,7 @@ public class RussianStemTokenFilterFactory extends AbstractTokenFilterFactory { public RussianStemTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ScandinavianFoldingFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ScandinavianFoldingFilterFactory.java index 913dd2a7b4b50..c429ae1a576f8 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ScandinavianFoldingFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ScandinavianFoldingFilterFactory.java @@ -21,7 +21,7 @@ public class ScandinavianFoldingFilterFactory extends AbstractTokenFilterFactory implements NormalizingTokenFilterFactory { ScandinavianFoldingFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ScandinavianNormalizationFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ScandinavianNormalizationFilterFactory.java index 9329d019ffccd..508e2b6f27155 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ScandinavianNormalizationFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ScandinavianNormalizationFilterFactory.java @@ -21,7 +21,7 @@ public class ScandinavianNormalizationFilterFactory extends AbstractTokenFilterFactory implements NormalizingTokenFilterFactory { ScandinavianNormalizationFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ScriptedConditionTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ScriptedConditionTokenFilterFactory.java index 1c6b02ea524b6..d758bcb9987a6 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ScriptedConditionTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ScriptedConditionTokenFilterFactory.java @@ -35,7 +35,7 @@ public class ScriptedConditionTokenFilterFactory extends AbstractTokenFilterFact private final List filterNames; ScriptedConditionTokenFilterFactory(IndexSettings indexSettings, String name, Settings settings, ScriptService scriptService) { - super(indexSettings, name, settings); + super(name, settings); Settings scriptSettings = settings.getAsSettings("script"); Script script = Script.parse(scriptSettings); diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SerbianNormalizationFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SerbianNormalizationFilterFactory.java index 6beb88d6f2552..4da6c2f16d965 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SerbianNormalizationFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SerbianNormalizationFilterFactory.java @@ -19,7 +19,7 @@ public class SerbianNormalizationFilterFactory extends AbstractTokenFilterFactory implements NormalizingTokenFilterFactory { SerbianNormalizationFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SnowballTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SnowballTokenFilterFactory.java index 65f9706287eec..57b19f8348c8e 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SnowballTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SnowballTokenFilterFactory.java @@ -24,7 +24,7 @@ public class SnowballTokenFilterFactory extends AbstractTokenFilterFactory { private String language; SnowballTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.language = Strings.capitalize(settings.get("language", settings.get("name", "English"))); } diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SoraniNormalizationFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SoraniNormalizationFilterFactory.java index 521d89cd861a2..a5e3128f4ddc6 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SoraniNormalizationFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SoraniNormalizationFilterFactory.java @@ -21,7 +21,7 @@ public class SoraniNormalizationFilterFactory extends AbstractTokenFilterFactory implements NormalizingTokenFilterFactory { public SoraniNormalizationFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/StemmerOverrideTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/StemmerOverrideTokenFilterFactory.java index edf5539e5f444..105267eeb14d4 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/StemmerOverrideTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/StemmerOverrideTokenFilterFactory.java @@ -25,7 +25,7 @@ public class StemmerOverrideTokenFilterFactory extends AbstractTokenFilterFactor private final StemmerOverrideMap overrideMap; StemmerOverrideTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) throws IOException { - super(indexSettings, name, settings); + super(name, settings); List rules = Analysis.getWordList(env, settings, "rules"); if (rules == null) { diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/StemmerTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/StemmerTokenFilterFactory.java index 89e656c83911f..4ef2f837368c9 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/StemmerTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/StemmerTokenFilterFactory.java @@ -82,7 +82,7 @@ public class StemmerTokenFilterFactory extends AbstractTokenFilterFactory { private String language; StemmerTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) throws IOException { - super(indexSettings, name, settings); + super(name, settings); this.language = Strings.capitalize(settings.get("language", settings.get("name", "porter"))); // check that we have a valid language by trying to create a TokenStream create(EMPTY_TOKEN_STREAM).close(); diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SynonymTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SynonymTokenFilterFactory.java index be49770e80402..e700f7d291d5c 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SynonymTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/SynonymTokenFilterFactory.java @@ -42,7 +42,7 @@ public class SynonymTokenFilterFactory extends AbstractTokenFilterFactory { protected final AnalysisMode analysisMode; SynonymTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.settings = settings; if (settings.get("ignore_case") != null) { diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/TrimTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/TrimTokenFilterFactory.java index 0c3321abc3b57..433f9f2ca380f 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/TrimTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/TrimTokenFilterFactory.java @@ -21,7 +21,7 @@ public class TrimTokenFilterFactory extends AbstractTokenFilterFactory implement private static final String UPDATE_OFFSETS_KEY = "update_offsets"; TrimTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); if (settings.get(UPDATE_OFFSETS_KEY) != null) { throw new IllegalArgumentException(UPDATE_OFFSETS_KEY + " is not supported anymore. Please fix your analysis chain"); } diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/TruncateTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/TruncateTokenFilterFactory.java index e933b40fc7f1b..6c37ac70b89e8 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/TruncateTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/TruncateTokenFilterFactory.java @@ -20,7 +20,7 @@ public class TruncateTokenFilterFactory extends AbstractTokenFilterFactory { private final int length; TruncateTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.length = settings.getAsInt("length", -1); if (length <= 0) { throw new IllegalArgumentException("length parameter must be provided"); diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/UniqueTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/UniqueTokenFilterFactory.java index 6c1428bbf0567..15f15530d112b 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/UniqueTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/UniqueTokenFilterFactory.java @@ -19,7 +19,7 @@ public class UniqueTokenFilterFactory extends AbstractTokenFilterFactory { private final boolean onlyOnSamePosition; UniqueTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.onlyOnSamePosition = settings.getAsBoolean("only_on_same_position", false); } diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/UpperCaseTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/UpperCaseTokenFilterFactory.java index f091e0e44bb8b..6e7ce922328db 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/UpperCaseTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/UpperCaseTokenFilterFactory.java @@ -19,7 +19,7 @@ public class UpperCaseTokenFilterFactory extends AbstractTokenFilterFactory implements NormalizingTokenFilterFactory { public UpperCaseTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/WordDelimiterGraphTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/WordDelimiterGraphTokenFilterFactory.java index 3fcbd17067791..fe4f62ef3f2cb 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/WordDelimiterGraphTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/WordDelimiterGraphTokenFilterFactory.java @@ -43,7 +43,7 @@ public class WordDelimiterGraphTokenFilterFactory extends AbstractTokenFilterFac @SuppressWarnings("HiddenField") public WordDelimiterGraphTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); // Sample Format for the type table: // $ => DIGIT diff --git a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/WordDelimiterTokenFilterFactory.java b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/WordDelimiterTokenFilterFactory.java index 020462e727316..9848a56f5395a 100644 --- a/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/WordDelimiterTokenFilterFactory.java +++ b/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/WordDelimiterTokenFilterFactory.java @@ -46,7 +46,7 @@ public class WordDelimiterTokenFilterFactory extends AbstractTokenFilterFactory @SuppressWarnings("HiddenField") public WordDelimiterTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); // Sample Format for the type table: // $ => DIGIT diff --git a/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuCollationTokenFilterFactory.java b/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuCollationTokenFilterFactory.java index 78ede2e63a8c3..2e7268bbafbd0 100644 --- a/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuCollationTokenFilterFactory.java +++ b/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuCollationTokenFilterFactory.java @@ -43,7 +43,7 @@ public class IcuCollationTokenFilterFactory extends AbstractTokenFilterFactory { @SuppressWarnings("HiddenField") public IcuCollationTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); Collator collator; String rules = settings.get("rules"); diff --git a/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuFoldingTokenFilterFactory.java b/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuFoldingTokenFilterFactory.java index aa7a25e89344b..17cc2cfffe2dc 100644 --- a/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuFoldingTokenFilterFactory.java +++ b/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuFoldingTokenFilterFactory.java @@ -38,7 +38,7 @@ public class IcuFoldingTokenFilterFactory extends AbstractTokenFilterFactory imp private final Normalizer2 normalizer; public IcuFoldingTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.normalizer = IcuNormalizerTokenFilterFactory.wrapWithUnicodeSetFilter(indexSettings, ICU_FOLDING_NORMALIZER, settings); } diff --git a/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuNormalizerTokenFilterFactory.java b/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuNormalizerTokenFilterFactory.java index 81df59daa87c7..0528492feaad7 100644 --- a/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuNormalizerTokenFilterFactory.java +++ b/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuNormalizerTokenFilterFactory.java @@ -29,7 +29,7 @@ public class IcuNormalizerTokenFilterFactory extends AbstractTokenFilterFactory private final Normalizer2 normalizer; public IcuNormalizerTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); String method = settings.get("name", "nfkc_cf"); Normalizer2 normalizerInstance = Normalizer2.getInstance(null, method, Normalizer2.Mode.COMPOSE); this.normalizer = wrapWithUnicodeSetFilter(indexSettings, normalizerInstance, settings); diff --git a/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuTransformTokenFilterFactory.java b/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuTransformTokenFilterFactory.java index 9222a7c811fd5..67e755a4fd54a 100644 --- a/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuTransformTokenFilterFactory.java +++ b/plugins/analysis-icu/src/main/java/org/elasticsearch/plugin/analysis/icu/IcuTransformTokenFilterFactory.java @@ -25,7 +25,7 @@ public class IcuTransformTokenFilterFactory extends AbstractTokenFilterFactory i private final Transliterator transliterator; public IcuTransformTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.id = settings.get("id", "Null"); String s = settings.get("dir", "forward"); this.dir = "forward".equals(s) ? Transliterator.FORWARD : Transliterator.REVERSE; diff --git a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/JapaneseStopTokenFilterFactory.java b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/JapaneseStopTokenFilterFactory.java index fc368ea9f09e1..50e37df9700a4 100644 --- a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/JapaneseStopTokenFilterFactory.java +++ b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/JapaneseStopTokenFilterFactory.java @@ -34,7 +34,7 @@ public class JapaneseStopTokenFilterFactory extends AbstractTokenFilterFactory { private final boolean removeTrailing; public JapaneseStopTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.ignoreCase = settings.getAsBoolean("ignore_case", false); this.removeTrailing = settings.getAsBoolean("remove_trailing", true); this.stopWords = Analysis.parseWords( diff --git a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiBaseFormFilterFactory.java b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiBaseFormFilterFactory.java index 5bb23298e1709..81f51e5ec4247 100644 --- a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiBaseFormFilterFactory.java +++ b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiBaseFormFilterFactory.java @@ -18,7 +18,7 @@ public class KuromojiBaseFormFilterFactory extends AbstractTokenFilterFactory { public KuromojiBaseFormFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiCompletionFilterFactory.java b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiCompletionFilterFactory.java index 60e0676cb5108..a5a5bfd75da93 100644 --- a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiCompletionFilterFactory.java +++ b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiCompletionFilterFactory.java @@ -21,7 +21,7 @@ public class KuromojiCompletionFilterFactory extends AbstractTokenFilterFactory private final Mode mode; public KuromojiCompletionFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); mode = getMode(settings); } diff --git a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiKatakanaStemmerFactory.java b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiKatakanaStemmerFactory.java index c4bcbdd5a3d45..f620fbc39c580 100644 --- a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiKatakanaStemmerFactory.java +++ b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiKatakanaStemmerFactory.java @@ -20,7 +20,7 @@ public class KuromojiKatakanaStemmerFactory extends AbstractTokenFilterFactory { private final int minimumLength; public KuromojiKatakanaStemmerFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); minimumLength = settings.getAsInt("minimum_length", JapaneseKatakanaStemFilter.DEFAULT_MINIMUM_LENGTH); } diff --git a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiNumberFilterFactory.java b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiNumberFilterFactory.java index ccda413929764..f3b66e929e3fa 100644 --- a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiNumberFilterFactory.java +++ b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiNumberFilterFactory.java @@ -17,7 +17,7 @@ public class KuromojiNumberFilterFactory extends AbstractTokenFilterFactory { public KuromojiNumberFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiPartOfSpeechFilterFactory.java b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiPartOfSpeechFilterFactory.java index e8b717fb7fe32..f5fb8479ed7ba 100644 --- a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiPartOfSpeechFilterFactory.java +++ b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiPartOfSpeechFilterFactory.java @@ -26,7 +26,7 @@ public class KuromojiPartOfSpeechFilterFactory extends AbstractTokenFilterFactor private final Set stopTags = new HashSet<>(); public KuromojiPartOfSpeechFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); List wordList = Analysis.getWordList(env, settings, "stoptags"); if (wordList != null) { stopTags.addAll(wordList); diff --git a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiReadingFormFilterFactory.java b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiReadingFormFilterFactory.java index 58cf799c84e32..ddd7f04db68dd 100644 --- a/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiReadingFormFilterFactory.java +++ b/plugins/analysis-kuromoji/src/main/java/org/elasticsearch/plugin/analysis/kuromoji/KuromojiReadingFormFilterFactory.java @@ -20,7 +20,7 @@ public class KuromojiReadingFormFilterFactory extends AbstractTokenFilterFactory private final boolean useRomaji; public KuromojiReadingFormFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); useRomaji = settings.getAsBoolean("use_romaji", false); } diff --git a/plugins/analysis-nori/src/main/java/org/elasticsearch/plugin/analysis/nori/NoriNumberFilterFactory.java b/plugins/analysis-nori/src/main/java/org/elasticsearch/plugin/analysis/nori/NoriNumberFilterFactory.java index c3d1784438464..d75ead01bf1f0 100644 --- a/plugins/analysis-nori/src/main/java/org/elasticsearch/plugin/analysis/nori/NoriNumberFilterFactory.java +++ b/plugins/analysis-nori/src/main/java/org/elasticsearch/plugin/analysis/nori/NoriNumberFilterFactory.java @@ -18,7 +18,7 @@ public class NoriNumberFilterFactory extends AbstractTokenFilterFactory { public NoriNumberFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/plugins/analysis-nori/src/main/java/org/elasticsearch/plugin/analysis/nori/NoriPartOfSpeechStopFilterFactory.java b/plugins/analysis-nori/src/main/java/org/elasticsearch/plugin/analysis/nori/NoriPartOfSpeechStopFilterFactory.java index e55c8ed4dfb14..7b60219dd36f7 100644 --- a/plugins/analysis-nori/src/main/java/org/elasticsearch/plugin/analysis/nori/NoriPartOfSpeechStopFilterFactory.java +++ b/plugins/analysis-nori/src/main/java/org/elasticsearch/plugin/analysis/nori/NoriPartOfSpeechStopFilterFactory.java @@ -25,7 +25,7 @@ public class NoriPartOfSpeechStopFilterFactory extends AbstractTokenFilterFactor private final Set stopTags; public NoriPartOfSpeechStopFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); List tagList = Analysis.getWordList(env, settings, "stoptags"); this.stopTags = tagList != null ? resolvePOSList(tagList) : KoreanPartOfSpeechStopFilter.DEFAULT_STOP_TAGS; } diff --git a/plugins/analysis-nori/src/main/java/org/elasticsearch/plugin/analysis/nori/NoriReadingFormFilterFactory.java b/plugins/analysis-nori/src/main/java/org/elasticsearch/plugin/analysis/nori/NoriReadingFormFilterFactory.java index f23fd8cf6dd0e..7a23039b3d810 100644 --- a/plugins/analysis-nori/src/main/java/org/elasticsearch/plugin/analysis/nori/NoriReadingFormFilterFactory.java +++ b/plugins/analysis-nori/src/main/java/org/elasticsearch/plugin/analysis/nori/NoriReadingFormFilterFactory.java @@ -17,7 +17,7 @@ public class NoriReadingFormFilterFactory extends AbstractTokenFilterFactory { public NoriReadingFormFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/plugins/analysis-phonetic/src/main/java/org/elasticsearch/plugin/analysis/phonetic/PhoneticTokenFilterFactory.java b/plugins/analysis-phonetic/src/main/java/org/elasticsearch/plugin/analysis/phonetic/PhoneticTokenFilterFactory.java index 586ed4729fb70..65a790dc576c0 100644 --- a/plugins/analysis-phonetic/src/main/java/org/elasticsearch/plugin/analysis/phonetic/PhoneticTokenFilterFactory.java +++ b/plugins/analysis-phonetic/src/main/java/org/elasticsearch/plugin/analysis/phonetic/PhoneticTokenFilterFactory.java @@ -45,7 +45,7 @@ public class PhoneticTokenFilterFactory extends AbstractTokenFilterFactory { private boolean isDaitchMokotoff; public PhoneticTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.languageset = null; this.nametype = null; this.ruletype = null; diff --git a/plugins/analysis-smartcn/src/main/java/org/elasticsearch/plugin/analysis/smartcn/SmartChineseNoOpTokenFilterFactory.java b/plugins/analysis-smartcn/src/main/java/org/elasticsearch/plugin/analysis/smartcn/SmartChineseNoOpTokenFilterFactory.java index 2e07ab5e4889b..677b483dfcec3 100644 --- a/plugins/analysis-smartcn/src/main/java/org/elasticsearch/plugin/analysis/smartcn/SmartChineseNoOpTokenFilterFactory.java +++ b/plugins/analysis-smartcn/src/main/java/org/elasticsearch/plugin/analysis/smartcn/SmartChineseNoOpTokenFilterFactory.java @@ -17,7 +17,7 @@ public class SmartChineseNoOpTokenFilterFactory extends AbstractTokenFilterFactory { public SmartChineseNoOpTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/plugins/analysis-smartcn/src/main/java/org/elasticsearch/plugin/analysis/smartcn/SmartChineseStopTokenFilterFactory.java b/plugins/analysis-smartcn/src/main/java/org/elasticsearch/plugin/analysis/smartcn/SmartChineseStopTokenFilterFactory.java index d261465fa4c11..a88740282f267 100644 --- a/plugins/analysis-smartcn/src/main/java/org/elasticsearch/plugin/analysis/smartcn/SmartChineseStopTokenFilterFactory.java +++ b/plugins/analysis-smartcn/src/main/java/org/elasticsearch/plugin/analysis/smartcn/SmartChineseStopTokenFilterFactory.java @@ -34,7 +34,7 @@ public class SmartChineseStopTokenFilterFactory extends AbstractTokenFilterFacto private final boolean removeTrailing; public SmartChineseStopTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.ignoreCase = settings.getAsBoolean("ignore_case", false); this.removeTrailing = settings.getAsBoolean("remove_trailing", true); this.stopWords = Analysis.parseWords( diff --git a/plugins/analysis-stempel/src/main/java/org/elasticsearch/index/analysis/pl/PolishStemTokenFilterFactory.java b/plugins/analysis-stempel/src/main/java/org/elasticsearch/index/analysis/pl/PolishStemTokenFilterFactory.java index b6f630bb78e6e..6887dc661af85 100644 --- a/plugins/analysis-stempel/src/main/java/org/elasticsearch/index/analysis/pl/PolishStemTokenFilterFactory.java +++ b/plugins/analysis-stempel/src/main/java/org/elasticsearch/index/analysis/pl/PolishStemTokenFilterFactory.java @@ -20,7 +20,7 @@ public class PolishStemTokenFilterFactory extends AbstractTokenFilterFactory { public PolishStemTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override diff --git a/plugins/analysis-stempel/src/main/java/org/elasticsearch/index/analysis/pl/PolishStopTokenFilterFactory.java b/plugins/analysis-stempel/src/main/java/org/elasticsearch/index/analysis/pl/PolishStopTokenFilterFactory.java index 9b35bd4ed2b87..3ec480a4f85b2 100644 --- a/plugins/analysis-stempel/src/main/java/org/elasticsearch/index/analysis/pl/PolishStopTokenFilterFactory.java +++ b/plugins/analysis-stempel/src/main/java/org/elasticsearch/index/analysis/pl/PolishStopTokenFilterFactory.java @@ -34,7 +34,7 @@ public class PolishStopTokenFilterFactory extends AbstractTokenFilterFactory { private final boolean removeTrailing; public PolishStopTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.ignoreCase = settings.getAsBoolean("ignore_case", false); this.removeTrailing = settings.getAsBoolean("remove_trailing", true); this.stopWords = Analysis.parseWords(env, settings, "stopwords", PolishAnalyzer.getDefaultStopSet(), NAMED_STOP_WORDS, ignoreCase); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java index 43c9d9e008cc9..fe0b53654f8c1 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java @@ -1470,7 +1470,7 @@ public static final class TestAnalysisPlugin extends Plugin implements AnalysisP public Map> getTokenFilters() { return singletonMap( "test_token_filter", - (indexSettings, environment, name, settings) -> new AbstractTokenFilterFactory(indexSettings, name, settings) { + (indexSettings, environment, name, settings) -> new AbstractTokenFilterFactory(name, settings) { @Override public TokenStream create(TokenStream tokenStream) { if (throwParsingError.get()) { diff --git a/server/src/main/java/org/elasticsearch/index/analysis/AbstractTokenFilterFactory.java b/server/src/main/java/org/elasticsearch/index/analysis/AbstractTokenFilterFactory.java index 4c96d090dfc02..1f292202f33c3 100644 --- a/server/src/main/java/org/elasticsearch/index/analysis/AbstractTokenFilterFactory.java +++ b/server/src/main/java/org/elasticsearch/index/analysis/AbstractTokenFilterFactory.java @@ -9,15 +9,12 @@ package org.elasticsearch.index.analysis; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.AbstractIndexComponent; -import org.elasticsearch.index.IndexSettings; -public abstract class AbstractTokenFilterFactory extends AbstractIndexComponent implements TokenFilterFactory { +public abstract class AbstractTokenFilterFactory implements TokenFilterFactory { private final String name; - public AbstractTokenFilterFactory(IndexSettings indexSettings, String name, Settings settings) { - super(indexSettings); + public AbstractTokenFilterFactory(String name, Settings settings) { this.name = name; Analysis.checkForDeprecatedVersion(name, settings); } diff --git a/server/src/main/java/org/elasticsearch/index/analysis/HunspellTokenFilterFactory.java b/server/src/main/java/org/elasticsearch/index/analysis/HunspellTokenFilterFactory.java index 484ace1a9e745..2ee0f0924fbb8 100644 --- a/server/src/main/java/org/elasticsearch/index/analysis/HunspellTokenFilterFactory.java +++ b/server/src/main/java/org/elasticsearch/index/analysis/HunspellTokenFilterFactory.java @@ -23,7 +23,7 @@ public class HunspellTokenFilterFactory extends AbstractTokenFilterFactory { private final boolean longestOnly; public HunspellTokenFilterFactory(IndexSettings indexSettings, String name, Settings settings, HunspellService hunspellService) { - super(indexSettings, name, settings); + super(name, settings); String locale = settings.get("locale", settings.get("language", settings.get("lang", null))); if (locale == null) { diff --git a/server/src/main/java/org/elasticsearch/index/analysis/ShingleTokenFilterFactory.java b/server/src/main/java/org/elasticsearch/index/analysis/ShingleTokenFilterFactory.java index 407a7005f9167..15e95e730af84 100644 --- a/server/src/main/java/org/elasticsearch/index/analysis/ShingleTokenFilterFactory.java +++ b/server/src/main/java/org/elasticsearch/index/analysis/ShingleTokenFilterFactory.java @@ -24,8 +24,11 @@ public class ShingleTokenFilterFactory extends AbstractTokenFilterFactory { private final Factory factory; + private final IndexSettings indexSettings; + public ShingleTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); + this.indexSettings = indexSettings; int maxAllowedShingleDiff = indexSettings.getMaxShingleDiff(); Integer maxShingleSize = settings.getAsInt("max_shingle_size", ShingleFilter.DEFAULT_MAX_SHINGLE_SIZE); Integer minShingleSize = settings.getAsInt("min_shingle_size", ShingleFilter.DEFAULT_MIN_SHINGLE_SIZE); diff --git a/server/src/main/java/org/elasticsearch/index/analysis/StopTokenFilterFactory.java b/server/src/main/java/org/elasticsearch/index/analysis/StopTokenFilterFactory.java index dcaf009407ece..5fde735a80a52 100644 --- a/server/src/main/java/org/elasticsearch/index/analysis/StopTokenFilterFactory.java +++ b/server/src/main/java/org/elasticsearch/index/analysis/StopTokenFilterFactory.java @@ -28,7 +28,7 @@ public class StopTokenFilterFactory extends AbstractTokenFilterFactory { private final boolean removeTrailing; public StopTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); this.ignoreCase = settings.getAsBoolean("ignore_case", false); this.removeTrailing = settings.getAsBoolean("remove_trailing", true); this.stopWords = Analysis.parseStopWords(env, settings, EnglishAnalyzer.ENGLISH_STOP_WORDS_SET, ignoreCase); diff --git a/server/src/main/java/org/elasticsearch/indices/analysis/AnalysisModule.java b/server/src/main/java/org/elasticsearch/indices/analysis/AnalysisModule.java index a46aeed7fb17f..934fb5b83265d 100644 --- a/server/src/main/java/org/elasticsearch/indices/analysis/AnalysisModule.java +++ b/server/src/main/java/org/elasticsearch/indices/analysis/AnalysisModule.java @@ -135,7 +135,7 @@ public TokenFilterFactory get(IndexSettings indexSettings, Environment environme } else { throw new IllegalArgumentException("The [standard] token filter has been removed."); } - return new AbstractTokenFilterFactory(indexSettings, name, settings) { + return new AbstractTokenFilterFactory(name, settings) { @Override public TokenStream create(TokenStream tokenStream) { return tokenStream; diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/TransportAnalyzeActionTests.java b/server/src/test/java/org/elasticsearch/action/admin/indices/TransportAnalyzeActionTests.java index cffc8e2334b2f..0ee3ce1db914f 100644 --- a/server/src/test/java/org/elasticsearch/action/admin/indices/TransportAnalyzeActionTests.java +++ b/server/src/test/java/org/elasticsearch/action/admin/indices/TransportAnalyzeActionTests.java @@ -17,7 +17,6 @@ import org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction; import org.elasticsearch.cluster.metadata.IndexMetadata; import org.elasticsearch.common.UUIDs; -import org.elasticsearch.common.logging.DeprecationCategory; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; @@ -28,7 +27,6 @@ import org.elasticsearch.index.analysis.AnalysisRegistry; import org.elasticsearch.index.analysis.CharFilterFactory; import org.elasticsearch.index.analysis.IndexAnalyzers; -import org.elasticsearch.index.analysis.NormalizingTokenFilterFactory; import org.elasticsearch.index.analysis.PreConfiguredCharFilter; import org.elasticsearch.index.analysis.TokenFilterFactory; import org.elasticsearch.index.analysis.TokenizerFactory; @@ -85,7 +83,7 @@ class MockFactory extends AbstractTokenFilterFactory { final CharacterRunAutomaton stopset; MockFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); if (settings.hasValue("stopword")) { this.stopset = new CharacterRunAutomaton(Automata.makeString(settings.get("stopword"))); } else { @@ -99,33 +97,6 @@ public TokenStream create(TokenStream tokenStream) { } } - class DeprecatedTokenFilterFactory extends AbstractTokenFilterFactory implements NormalizingTokenFilterFactory { - - DeprecatedTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); - } - - @Override - public TokenStream create(TokenStream tokenStream) { - deprecationLogger.warn( - DeprecationCategory.ANALYSIS, - "deprecated_token_filter_create", - "Using deprecated token filter [deprecated]" - ); - return tokenStream; - } - - @Override - public TokenStream normalize(TokenStream tokenStream) { - deprecationLogger.warn( - DeprecationCategory.ANALYSIS, - "deprecated_token_filter_normalize", - "Using deprecated token filter [deprecated]" - ); - return tokenStream; - } - } - class AppendCharFilterFactory extends AbstractCharFilterFactory { final String suffix; @@ -159,7 +130,7 @@ public Map> getTokenizers() { @Override public Map> getTokenFilters() { - return Map.of("mock", MockFactory::new, "deprecated", DeprecatedTokenFilterFactory::new); + return Map.of("mock", MockFactory::new); } @Override @@ -551,21 +522,17 @@ public void testDeprecationWarnings() throws IOException { AnalyzeAction.Request req = new AnalyzeAction.Request(); req.tokenizer("standard"); req.addTokenFilter("lowercase"); - req.addTokenFilter("deprecated"); req.text("test text"); AnalyzeAction.Response analyze = TransportAnalyzeAction.analyze(req, registry, mockIndexService(), maxTokenCount); assertEquals(2, analyze.getTokens().size()); - assertWarnings("Using deprecated token filter [deprecated]"); // normalizer req = new AnalyzeAction.Request(); req.addTokenFilter("lowercase"); - req.addTokenFilter("deprecated"); req.text("text"); analyze = TransportAnalyzeAction.analyze(req, registry, mockIndexService(), maxTokenCount); assertEquals(1, analyze.getTokens().size()); - assertWarnings("Using deprecated token filter [deprecated]"); } } diff --git a/server/src/test/java/org/elasticsearch/index/analysis/AnalysisRegistryTests.java b/server/src/test/java/org/elasticsearch/index/analysis/AnalysisRegistryTests.java index 52062d6d1f438..6c10cea9b8bf2 100644 --- a/server/src/test/java/org/elasticsearch/index/analysis/AnalysisRegistryTests.java +++ b/server/src/test/java/org/elasticsearch/index/analysis/AnalysisRegistryTests.java @@ -21,7 +21,6 @@ import org.apache.lucene.tests.analysis.MockTokenFilter; import org.elasticsearch.Version; import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.logging.DeprecationCategory; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; @@ -129,7 +128,7 @@ public void testOverrideDefaultAnalyzerWithoutAnalysisModeAll() throws IOExcepti Version version = VersionUtils.randomVersion(random()); Settings settings = Settings.builder().put(IndexMetadata.SETTING_VERSION_CREATED, version).build(); IndexSettings indexSettings = IndexSettingsModule.newIndexSettings("index", settings); - TokenFilterFactory tokenFilter = new AbstractTokenFilterFactory(indexSettings, "my_filter", Settings.EMPTY) { + TokenFilterFactory tokenFilter = new AbstractTokenFilterFactory("my_filter", Settings.EMPTY) { @Override public AnalysisMode getAnalysisMode() { return randomFrom(AnalysisMode.SEARCH_TIME, AnalysisMode.INDEX_TIME); @@ -237,7 +236,7 @@ public void testConfigureCamelCaseTokenFilter() throws IOException { AnalysisPlugin plugin = new AnalysisPlugin() { class MockFactory extends AbstractTokenFilterFactory { MockFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); + super(name, settings); } @Override @@ -339,139 +338,4 @@ public void testEnsureCloseInvocationProperlyDelegated() throws IOException { registry.close(); verify(mock).close(); } - - public void testDeprecationsAndExceptions() throws IOException { - - AnalysisPlugin plugin = new AnalysisPlugin() { - - class MockFactory extends AbstractTokenFilterFactory { - MockFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); - } - - @Override - public TokenStream create(TokenStream tokenStream) { - if (indexSettings.getIndexVersionCreated().equals(Version.CURRENT)) { - deprecationLogger.warn( - DeprecationCategory.ANALYSIS, - "deprecated_token_filter", - "Using deprecated token filter [deprecated]" - ); - } - return tokenStream; - } - } - - class ExceptionFactory extends AbstractTokenFilterFactory { - - ExceptionFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); - } - - @Override - public TokenStream create(TokenStream tokenStream) { - if (indexSettings.getIndexVersionCreated().equals(Version.CURRENT)) { - throw new IllegalArgumentException("Cannot use token filter [exception]"); - } - return tokenStream; - } - } - - class UnusedMockFactory extends AbstractTokenFilterFactory { - UnusedMockFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); - } - - @Override - public TokenStream create(TokenStream tokenStream) { - deprecationLogger.warn(DeprecationCategory.ANALYSIS, "unused_token_filter", "Using deprecated token filter [unused]"); - return tokenStream; - } - } - - class NormalizerFactory extends AbstractTokenFilterFactory implements NormalizingTokenFilterFactory { - - NormalizerFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, settings); - } - - @Override - public TokenStream create(TokenStream tokenStream) { - deprecationLogger.warn( - DeprecationCategory.ANALYSIS, - "deprecated_normalizer", - "Using deprecated token filter [deprecated_normalizer]" - ); - return tokenStream; - } - - } - - @Override - public Map> getTokenFilters() { - return Map.of( - "deprecated", - MockFactory::new, - "unused", - UnusedMockFactory::new, - "deprecated_normalizer", - NormalizerFactory::new, - "exception", - ExceptionFactory::new - ); - } - }; - - Settings settings = Settings.builder().put(Environment.PATH_HOME_SETTING.getKey(), createTempDir().toString()).build(); - Settings indexSettings = Settings.builder() - .put(IndexMetadata.SETTING_VERSION_CREATED, Version.CURRENT) - .put("index.analysis.filter.deprecated.type", "deprecated") - .put("index.analysis.analyzer.custom.tokenizer", "standard") - .putList("index.analysis.analyzer.custom.filter", "lowercase", "deprecated") - .build(); - - IndexSettings idxSettings = IndexSettingsModule.newIndexSettings("index", indexSettings); - - new AnalysisModule(TestEnvironment.newEnvironment(settings), singletonList(plugin)).getAnalysisRegistry().build(idxSettings); - - // We should only get a warning from the token filter that is referenced in settings - assertWarnings("Using deprecated token filter [deprecated]"); - - indexSettings = Settings.builder() - .put(IndexMetadata.SETTING_VERSION_CREATED, VersionUtils.getPreviousVersion()) - .put("index.analysis.filter.deprecated.type", "deprecated_normalizer") - .putList("index.analysis.normalizer.custom.filter", "lowercase", "deprecated_normalizer") - .put("index.analysis.filter.deprecated.type", "deprecated") - .put("index.analysis.filter.exception.type", "exception") - .put("index.analysis.analyzer.custom.tokenizer", "standard") - // exception will not throw because we're not on Version.CURRENT - .putList("index.analysis.analyzer.custom.filter", "lowercase", "deprecated", "exception") - .build(); - idxSettings = IndexSettingsModule.newIndexSettings("index", indexSettings); - - new AnalysisModule(TestEnvironment.newEnvironment(settings), singletonList(plugin)).getAnalysisRegistry().build(idxSettings); - - // We should only get a warning from the normalizer, because we're on a version where 'deprecated' - // works fine - assertWarnings("Using deprecated token filter [deprecated_normalizer]"); - - indexSettings = Settings.builder() - .put(IndexMetadata.SETTING_VERSION_CREATED, Version.CURRENT) - .put("index.analysis.filter.exception.type", "exception") - .put("index.analysis.analyzer.custom.tokenizer", "standard") - // exception will not throw because we're not on Version.LATEST - .putList("index.analysis.analyzer.custom.filter", "lowercase", "exception") - .build(); - IndexSettings exceptionSettings = IndexSettingsModule.newIndexSettings("index", indexSettings); - - IllegalArgumentException e = expectThrows( - IllegalArgumentException.class, - () -> { - new AnalysisModule(TestEnvironment.newEnvironment(settings), singletonList(plugin)).getAnalysisRegistry() - .build(exceptionSettings); - } - ); - assertEquals("Cannot use token filter [exception]", e.getMessage()); - - } } diff --git a/server/src/test/java/org/elasticsearch/index/analysis/ReloadableCustomAnalyzerTests.java b/server/src/test/java/org/elasticsearch/index/analysis/ReloadableCustomAnalyzerTests.java index debfd96b505c2..d93445ca2b815 100644 --- a/server/src/test/java/org/elasticsearch/index/analysis/ReloadableCustomAnalyzerTests.java +++ b/server/src/test/java/org/elasticsearch/index/analysis/ReloadableCustomAnalyzerTests.java @@ -17,7 +17,6 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.Index; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.test.IndexSettingsModule; import org.junit.BeforeClass; import java.io.IOException; @@ -34,11 +33,7 @@ public class ReloadableCustomAnalyzerTests extends ESTestCase { private static TestAnalysis testAnalysis; private static Settings settings = Settings.builder().put(IndexMetadata.SETTING_VERSION_CREATED, Version.CURRENT).build(); - private static TokenFilterFactory NO_OP_SEARCH_TIME_FILTER = new AbstractTokenFilterFactory( - IndexSettingsModule.newIndexSettings("index", settings), - "my_filter", - Settings.EMPTY - ) { + private static TokenFilterFactory NO_OP_SEARCH_TIME_FILTER = new AbstractTokenFilterFactory("my_filter", Settings.EMPTY) { @Override public AnalysisMode getAnalysisMode() { return AnalysisMode.SEARCH_TIME; @@ -50,11 +45,7 @@ public TokenStream create(TokenStream tokenStream) { } }; - private static TokenFilterFactory LOWERCASE_SEARCH_TIME_FILTER = new AbstractTokenFilterFactory( - IndexSettingsModule.newIndexSettings("index", settings), - "my_other_filter", - Settings.EMPTY - ) { + private static TokenFilterFactory LOWERCASE_SEARCH_TIME_FILTER = new AbstractTokenFilterFactory("my_other_filter", Settings.EMPTY) { @Override public AnalysisMode getAnalysisMode() { return AnalysisMode.SEARCH_TIME; diff --git a/server/src/test/java/org/elasticsearch/index/mapper/TextFieldAnalyzerModeTests.java b/server/src/test/java/org/elasticsearch/index/mapper/TextFieldAnalyzerModeTests.java index cdd3a6480983a..12d2536fa20f8 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/TextFieldAnalyzerModeTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/TextFieldAnalyzerModeTests.java @@ -50,7 +50,7 @@ private static Map defaultAnalyzers() { private static final IndexSettings indexSettings = new IndexSettings(EMPTY_INDEX_METADATA, Settings.EMPTY); private Analyzer createAnalyzerWithMode(AnalysisMode mode) { - TokenFilterFactory tokenFilter = new AbstractTokenFilterFactory(indexSettings, "my_analyzer", Settings.EMPTY) { + TokenFilterFactory tokenFilter = new AbstractTokenFilterFactory("my_analyzer", Settings.EMPTY) { @Override public AnalysisMode getAnalysisMode() { return mode; diff --git a/test/framework/src/main/java/org/elasticsearch/index/analysis/MyFilterTokenFilterFactory.java b/test/framework/src/main/java/org/elasticsearch/index/analysis/MyFilterTokenFilterFactory.java index 388dac78f07db..a7ae46f0e6e13 100644 --- a/test/framework/src/main/java/org/elasticsearch/index/analysis/MyFilterTokenFilterFactory.java +++ b/test/framework/src/main/java/org/elasticsearch/index/analysis/MyFilterTokenFilterFactory.java @@ -17,7 +17,7 @@ public class MyFilterTokenFilterFactory extends AbstractTokenFilterFactory { public MyFilterTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) { - super(indexSettings, name, Settings.EMPTY); + super(name, Settings.EMPTY); } @Override