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