src/Console/ElasticMigrateCommand.php
protected function deleteAlias($name)
    {
        $aliases = $this->getAlias($name);

        if (empty($aliases)) {
            return;
        }

        foreach ($aliases as $index => $alias) {
            $deletePayload = (new RawPayload())
                ->set('index', $index)
                ->set('name', $name)
                ->get();

            ElasticClient::indices()
                ->deleteAlias($deletePayload);

            $this->info(sprintf(
                'The %s alias for the %s index was deleted.',
                $name,
                $index
            ));
        }
    }
protected function deleteAlias($name)
    {
        $aliases = $this->getAlias($name);

        if (empty($aliases)) {
            return;
        }

        foreach ($aliases as $index => $alias) {
            $deletePayload = (new RawPayload())
                ->set('index', $index)
                ->set('name', $name)
                ->get();

            ElasticClient::indices()
                ->deleteAlias($deletePayload);

            $this->info(sprintf(
                'The %s alias for the %s index was deleted.',
                $name,
                $index
            ));
        }
    }
protected function deleteAlias ( $ name ) { $ aliases = $ this -> getAlias ( $ name ) ; if ( empty ( $ aliases ) ) { return ; } foreach ( $ aliases as $ index => $ alias ) { $ deletePayload = ( new RawPayload ( ) ) -> set ( 'index' , $ index ) -> set ( 'name' , $ name ) -> get ( ) ; ElasticClient :: indices ( ) -> deleteAlias ( $ deletePayload ) ; $ this -> info ( sprintf ( 'The %s alias for the %s index was deleted.' , $ name , $ index ) ) ; } }
Delete an alias.

@param string $name
@return void
Delete an alias .