We have elasticsearch 6.1.0 with custom default similarity.
Trying to upgrade from 6.1.0 to 6.1.2 and getting error when starting elasticsearch.
Caused by: java.lang.IllegalArgumentException: Unknown Similarity type [CustomSimilarityProvider] for [default]
at org.elasticsearch.index.similarity.SimilarityService.<init>(SimilarityService.java:88) ~[elasticsearch-6.1.2.jar:6.1.2]
at org.elasticsearch.cluster.metadata.MetaDataIndexUpgradeService.checkMappingsCompatibility(MetaDataIndexUpgradeService.java:139) ~[elasticsearch-6.1.2.jar:6.1.2]
at org.elasticsearch.cluster.metadata.MetaDataIndexUpgradeService.upgradeIndexMetaData(MetaDataIndexUpgradeService.java:94) ~[elasticsearch-6.1.2.jar:6.1.2]
It looks, like the exception is from this code.
Should the check be
if ((similarities.containsKey(typeName) == false || BUILT_IN.containsKey(typeName)) == false)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.