Fix ut: remap default to classic similarity for indices created before 5.0.
This commit is contained in:
parent
cc91014dee
commit
9d685f6876
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue