CavalliumDBEngine/src/main/java/it/cavallium/dbengine/client/IndicizerAnalyzers.java

20 lines
651 B
Java
Raw Normal View History

2021-05-28 16:04:59 +02:00
package it.cavallium.dbengine.client;
import it.cavallium.dbengine.lucene.analyzer.TextFieldsAnalyzer;
import java.util.Map;
public record IndicizerAnalyzers(TextFieldsAnalyzer defaultAnalyzer, Map<String, TextFieldsAnalyzer> fieldAnalyzer) {
public static IndicizerAnalyzers of() {
2022-01-11 22:23:07 +01:00
return of(TextFieldsAnalyzer.ICUCollationKey);
2021-05-28 16:04:59 +02:00
}
public static IndicizerAnalyzers of(TextFieldsAnalyzer defaultAnalyzer) {
return of(defaultAnalyzer, Map.of());
}
public static IndicizerAnalyzers of(TextFieldsAnalyzer defaultAnalyzer, Map<String, TextFieldsAnalyzer> fieldAnalyzer) {
return new IndicizerAnalyzers(defaultAnalyzer, fieldAnalyzer);
}
}