set_upgrade_mode is introduced in 6.7. It does not exist in 6.5.
The documentation states
When upgrading your cluster, in some circumstances you must restart your nodes and reindex your machine learning indices.
An upgrade from 6.5 -> 6.7 is not one of those circumstances as you should not have to reindex any of the internal machine learning indices.
The first time that this API will actually be necessary would be an upgrade from 6.7 -> 7.0 and IF you have machine learning indices that were created in 5.X. This is because those indices will need to be reindexed as Elasticsearch only supports indices that are one major version behind (e.g. 5.X indices will NOT be supported in 7.X).
So, to upgrade from 6.5->6.7 the old process that includes stopping all ML jobs and datafeeds should be followed. To quote the section about upgrading TO 6.7:
Consider closing machine learning jobs before you start the upgrade process. It is not required, but there are pros and cons to leaving the jobs running.
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.