diff --git a/src/main/java/mediathek/tool/LuceneDefaultAnalyzer.java b/src/main/java/mediathek/tool/LuceneDefaultAnalyzer.java index f5eebffa0..f0ddd638a 100644 --- a/src/main/java/mediathek/tool/LuceneDefaultAnalyzer.java +++ b/src/main/java/mediathek/tool/LuceneDefaultAnalyzer.java @@ -21,6 +21,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.lucene.analysis.Analyzer; +import org.apache.lucene.analysis.core.LowerCaseFilterFactory; +import org.apache.lucene.analysis.core.WhitespaceTokenizerFactory; import org.apache.lucene.analysis.custom.CustomAnalyzer; import org.apache.lucene.analysis.standard.StandardAnalyzer; @@ -34,8 +36,8 @@ public static Analyzer buildAnalyzer() { Analyzer analyzer; try { analyzer = CustomAnalyzer.builder() - .withTokenizer("whitespace") - .addTokenFilter("lowercase") + .withTokenizer(WhitespaceTokenizerFactory.class) + .addTokenFilter(LowerCaseFilterFactory.class) .build(); } catch (IOException e) {