src/ElasticSearch/Mapping.php
public function field($field, $config = array()) {
        if (is_string($config)) $config = array('type' => $config);
        $this->properties[$field] = $config;
        return $this;
    }
public function field($field, $config = array()) {
        if (is_string($config)) $config = array('type' => $config);
        $this->properties[$field] = $config;
        return $this;
    }
public function field ( $ field , $ config = array ( ) ) { if ( is_string ( $ config ) ) $ config = array ( 'type' => $ config ) ; $ this -> properties [ $ field ] = $ config ; return $ this ; }
Add or overwrite existing field by name

@param string $field
@param string|array $config
@return $this
Add or overwrite existing field by name