src/ElasticSearchClient/Mapping.php
public function deleteMapping($index)
    {
        try {
            $elasticclient = $this->client->getClient();
            $map = ['index' => $index];
            $response = $elasticclient->indices()->delete($map);
            return $response['acknowledged'];
        } catch (\Exception $ex) {
            return $ex->getMessage();
        }
    }
public function deleteMapping($index)
    {
        try {
            $elasticclient = $this->client->getClient();
            $map = ['index' => $index];
            $response = $elasticclient->indices()->delete($map);
            return $response['acknowledged'];
        } catch (\Exception $ex) {
            return $ex->getMessage();
        }
    }
public function deleteMapping ( $ index ) { try { $ elasticclient = $ this -> client -> getClient ( ) ; $ map = [ 'index' => $ index ] ; $ response = $ elasticclient -> indices ( ) -> delete ( $ map ) ; return $ response [ 'acknowledged' ] ; } catch ( \ Exception $ ex ) { return $ ex -> getMessage ( ) ; } }
Delete the previous mapping by passing its name

@param  $index Name of an exisiting index to delete
@return \ElasticSearchClient\ElasticSearchClient
Delete the previous mapping by passing its name