src/ElasticSearchClient/Mapping.php
public function createMapping(array $map)
    {
        try {
            $elasticclient = $this->client->getClient();
            $response = $elasticclient->indices()->create($map);
            return  $response['acknowledged'];
        } catch (\Exception $ex) {
            return $ex->getMessage();
        }
    }
public function createMapping(array $map)
    {
        try {
            $elasticclient = $this->client->getClient();
            $response = $elasticclient->indices()->create($map);
            return  $response['acknowledged'];
        } catch (\Exception $ex) {
            return $ex->getMessage();
        }
    }
public function createMapping ( array $ map ) { try { $ elasticclient = $ this -> client -> getClient ( ) ; $ response = $ elasticclient -> indices ( ) -> create ( $ map ) ; return $ response [ 'acknowledged' ] ; } catch ( \ Exception $ ex ) { return $ ex -> getMessage ( ) ; } }
Create mapping for Elasticsearch.

@param  array  $map An array of elasticsearch mapping
@return \ElasticSearchClient\ElasticSearchClient
Create mapping for Elasticsearch .