@classmethod
def set_alias(cls, index_name=None):
    """Set index alias from alias group constant."""
    if not index_name and not hasattr(cls, 'ALIASES') or hasattr(cls, 'ALIASES'
        ) and cls.is_alias_assigned():
        return False
    if not index_name:
        index_name = cls.get_index_name()
    conn = cls.get_connection()
    for one_alias in cls.ALIASES:
        result = conn.indices.put_alias(index_name, one_alias)
    return result
