public function aliasExists($alias)
    {
        $index_prefix = Config::get('larasearch.elasticsearch.index_prefix', '');
        if ($index_prefix && !Str::startsWith($alias, $index_prefix)) $alias = $index_prefix . $alias;

        return self::getClient()->indices()->existsAlias(['name' => $alias]);
    }
public function aliasExists($alias)
    {
        $index_prefix = Config::get('larasearch.elasticsearch.index_prefix', '');
        if ($index_prefix && !Str::startsWith($alias, $index_prefix)) $alias = $index_prefix . $alias;

        return self::getClient()->indices()->existsAlias(['name' => $alias]);
    }
public function aliasExists ( $ alias ) { $ index_prefix = Config :: get ( 'larasearch.elasticsearch.index_prefix' , '' ) ; if ( $ index_prefix && ! Str :: startsWith ( $ alias , $ index_prefix ) ) $ alias = $ index_prefix . $ alias ; return self :: getClient ( ) -> indices ( ) -> existsAlias ( [ 'name' => $ alias ] ) ; }
Check if an alias exists

@param $alias
@return bool
Check if an alias exists