def METHOD_NAME(self, connection: Connections, document_index: Index) -> None:
    alias_updates = []
    previous_index = self._get_old_index(connection=connection)
    for previous_index_name in previous_index:
        if previous_index_name != document_index._name:
            LOGGER.info(f"Deleting old index {previous_index_name}")
            alias_updates.append({"remove_index": {"index": previous_index_name}})
    alias_updates.append({"add": {
        "index": self.elasticsearch_new_index,
        "alias": self.elasticsearch_alias}})
    connection.indices.update_aliases({"actions": alias_updates})