Changing default similarity of an index

Hello!

I am using elasticsearch in a university course on IR, and it is therefore interesting to change the default similarity of an index to show differences in performance related to the different similarities.

In version 6.5, changing similarity was easy (just close the index, set new default similarity, open and refresh.

In Version 7.5, this features behaves strangely. It seems that upon change in similarity, elasticsearch does not clear the old similarity arguments. If I have DFR as current default similarity, and want to substitute it by BM25, ES will protest and say that "basic_model" is a wrong parameter for BM25. The workaround I found by googling is to explicitly set all the arguments of the old similarity function to null, and send them along with the put_settings API call when setting the new similarity.

Is this a bug, or a feature to facilitate something?

Is there a better way to achieve this change of default similarity?

Thanks

Michael

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.