This works when creating new indices, but if I want to upgrade an index from an older elasticsearch version (either by restoring a snapshot or by starting a newer elasticsearch on the server), I get the following errors:
I did not try to upgrade, but I expect it to fail. Elastic changed the way a similarity is configured, so it might or might not succeed.
Did you check the code? I mean from the stacktrace? The inner exception states that it cannot find your similarity…
It is AFAIK configurable afterwards via a put settings. So, you could try to remove the similarity in the old ES, open it in the new ES and re-apply the similarity.
A different approach would be to just reindex the complete index.
yeah, i've seen that. the strange thing is, that I can create a new index using the very same similarity name with no problems. thats why I think that either my way of registering a custom similarity is wrong or elasticsearch 5 has a bug here.
Thats a good idea and I will probably do an upgrade this way next week. Still that was not necessary with elasticsearch 2.4.
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.