Add legacy ICU

This commit is contained in:
Andrea Cavalli 2022-01-18 00:02:55 +01:00
parent 08ef14fb76
commit 119a4ffe85
2 changed files with 4 additions and 1 deletions

View File

@ -92,6 +92,7 @@ public class LuceneUtils {
private static final Analyzer luceneStandardAnalyzerInstance = new StandardAnalyzer(); private static final Analyzer luceneStandardAnalyzerInstance = new StandardAnalyzer();
private static final Analyzer luceneWordAnalyzerLegacy1Instance = new LegacyWordAnalyzer(false, true, true); private static final Analyzer luceneWordAnalyzerLegacy1Instance = new LegacyWordAnalyzer(false, true, true);
private static final Analyzer luceneWordAnalyzerLegacy2Instance = new LegacyWordAnalyzer(false, false, true); private static final Analyzer luceneWordAnalyzerLegacy2Instance = new LegacyWordAnalyzer(false, false, true);
private static final Analyzer luceneWordAnalyzerLegacy3Instance = new LegacyWordAnalyzer(false, true, true);
private static final Analyzer luceneWordAnalyzerStemInstance = new WordAnalyzer(false,true); private static final Analyzer luceneWordAnalyzerStemInstance = new WordAnalyzer(false,true);
private static final Analyzer luceneWordAnalyzerSimpleInstance = new WordAnalyzer(false, false); private static final Analyzer luceneWordAnalyzerSimpleInstance = new WordAnalyzer(false, false);
private static final Analyzer luceneICUCollationKeyInstance = new WordAnalyzer(true, true); private static final Analyzer luceneICUCollationKeyInstance = new WordAnalyzer(true, true);
@ -136,6 +137,7 @@ public class LuceneUtils {
case StandardMultilanguage -> luceneWordAnalyzerStemInstance; case StandardMultilanguage -> luceneWordAnalyzerStemInstance;
case LegacyFullText -> luceneWordAnalyzerLegacy1Instance; case LegacyFullText -> luceneWordAnalyzerLegacy1Instance;
case LegacyWordWithStemming -> luceneWordAnalyzerLegacy2Instance; case LegacyWordWithStemming -> luceneWordAnalyzerLegacy2Instance;
case LegacyICU -> luceneWordAnalyzerLegacy3Instance;
case StandardSimple -> luceneWordAnalyzerSimpleInstance; case StandardSimple -> luceneWordAnalyzerSimpleInstance;
case ICUCollationKey -> luceneICUCollationKeyInstance; case ICUCollationKey -> luceneICUCollationKeyInstance;
//noinspection UnnecessaryDefault //noinspection UnnecessaryDefault

View File

@ -10,5 +10,6 @@ public enum TextFieldsAnalyzer {
ICUCollationKey, ICUCollationKey,
StandardMultilanguage, StandardMultilanguage,
LegacyFullText, LegacyFullText,
LegacyWordWithStemming LegacyWordWithStemming,
LegacyICU
} }