Add no-op analyzer instance

This commit is contained in:
Andrea Cavalli 2023-04-07 11:47:46 +02:00
parent 161876c1ee
commit 0a325c6ef6

View File

@ -5,6 +5,11 @@ import org.apache.lucene.analysis.core.KeywordTokenizer;
public class NoOpAnalyzer extends Analyzer {
public static final Analyzer INSTANCE = new NoOpAnalyzer();
public NoOpAnalyzer() {
}
@Override
protected TokenStreamComponents createComponents(String fieldName) {
return new TokenStreamComponents(new KeywordTokenizer());