question: public IndexMetaData upgradeIndexMetaData ( IndexMetaData indexMetaData ) { if ( isUpgraded ( indexMetaData ) ) { return indexMetaData ; } checkSupportedVersion ( indexMetaData ) ; IndexMetaData newMetaData = upgradeLegacyRoutingSettings ( indexMetaData ) ; newMetaData = addDefaultUnitsIfNeeded ( newMetaData ) ; checkMappingsCompatibility ( newMetaData ) ; newMetaData = upgradeSettings ( newMetaData ) ; newMetaData = markAsUpgraded ( newMetaData ) ; return newMetaData ; }
target:  Checks that the index can be upgraded to the current version of the master node. <p/> If the index does not need upgrade it returns the index metadata unchanged, otherwise it returns a modified index metadata. If index cannot be updated the method throws an exception.