ElasticSearcher\Managers\IndicesManager::update PHP 메소드

update() 공개 메소드

Update the index and all its types. This should be used when wanting to reflect changes in the Index object with the elasticsearch server.
public update ( string $indexName )
$indexName string
    public function update($indexName)
    {
        $index = $this->getRegistered($indexName);
        foreach ($index->getTypes() as $type => $typeBody) {
            $params = ['index' => $index->getInternalName(), 'type' => $type, 'body' => [$type => $typeBody]];
            $this->elasticSearcher->getClient()->indices()->putMapping($params);
        }
    }