public function removeAlias($name) { $path = '_aliases'; $data = ['actions' => [['remove' => ['index' => $this->getName(), 'alias' => $name]]]]; return $this->getClient()->request($path, Request::POST, $data); }
/** * @param ElasticIndex $oldIndex * @param ElasticIndex $newIndex */ private function moveAliasBetweenIndices(ElasticIndex $oldIndex, ElasticIndex $newIndex) { $oldIndex->removeAlias(MappingCreator::ELASTIC_ALIAS); $newIndex->addAlias(MappingCreator::ELASTIC_ALIAS); }