Skip to content

Commit

Permalink
Remove long deprecated special 'base' case for similarity service
Browse files Browse the repository at this point in the history
  • Loading branch information
benwtrent committed Dec 5, 2024
1 parent 7070e95 commit e226329
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import org.apache.lucene.search.similarities.Similarity.SimScorer;
import org.apache.lucene.util.BytesRef;
import org.elasticsearch.common.TriFunction;
import org.elasticsearch.common.logging.DeprecationCategory;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.Maps;
import org.elasticsearch.core.Nullable;
Expand All @@ -40,7 +38,6 @@
import java.util.function.Supplier;

public final class SimilarityService {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(SimilarityService.class);
public static final String DEFAULT_SIMILARITY = "BM25";
private static final Map<String, Function<IndexVersion, Supplier<Similarity>>> DEFAULTS;
public static final Map<String, TriFunction<Settings, IndexVersion, ScriptService, Similarity>> BUILT_IN;
Expand Down Expand Up @@ -115,13 +112,6 @@ public SimilarityService(
defaultSimilarity = (providers.get("default") != null)
? providers.get("default").get()
: providers.get(SimilarityService.DEFAULT_SIMILARITY).get();
if (providers.get("base") != null) {
deprecationLogger.warn(
DeprecationCategory.QUERIES,
"base_similarity_ignored",
"The [base] similarity is ignored since query normalization and coords have been removed"
);
}
}

/**
Expand Down

0 comments on commit e226329

Please sign in to comment.