Skip to content

Commit

Permalink
- do not use SPI for Lucene Tokenizer and Filters
Browse files Browse the repository at this point in the history
  • Loading branch information
derreisende77 committed Nov 2, 2024
1 parent ee1fc95 commit ceaa93c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/mediathek/tool/LuceneDefaultAnalyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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) {
Expand Down

0 comments on commit ceaa93c

Please sign in to comment.