ElasticSearcher\Managers\IndicesManager::update PHP Method

update() public method

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);
        }
    }