Fix ut: remap default to classic similarity for indices created before 5.0.

This commit is contained in:
Jim Ferenczi 2016-06-21 12:05:44 +02:00
parent cc91014dee
commit 9d685f6876
1 changed files with 1 additions and 1 deletions

View File

@ -445,7 +445,7 @@ public class TypeParsers {
private static SimilarityProvider resolveSimilarity(Mapper.TypeParser.ParserContext parserContext, String name, String value) {
if (parserContext.indexVersionCreated().before(Version.V_5_0_0_alpha1) && "default".equals(value)) {
// "default" similarity has been renamed into "classic" in 3.x.
value = SimilarityService.DEFAULT_SIMILARITY;
value = "classic";
}
SimilarityProvider similarityProvider = parserContext.getSimilarity(value);
if (similarityProvider == null) {