'properties' => array( 'fullname' => array( 'type' => 'string', 'index' => 'no', 'store' => true, ), 'gender' => array('type' => 'string'), 'plumage' => array( 'type' => 'object', 'properties' => array( 'h' => array('type' => 'integer'), 's' => array('type' => 'integer'), 'l' => array('type' => 'integer'), ), ), 'location' => array('type' => 'geo_point'), 'glasses' => array('type' => 'boolean'), 'birthday' => array( 'type' => 'date', 'format' => 'yyyy-MM-dd', ), 'height' => array('type' => 'float'), ) ); $params = array(); $params['index'] = 'ducks'; $params['type'] = 'duck'; $params['body']['duck'] = $mapping; $client = new Elasticsearch\Client(); $result = $client->indices()->putMapping($params); # curl -XPUT 'http://localhost:9200/twitter/tweet/_mapping' -d ' { "tweet" : { "properties" : { "message" : { "type" : "string", "store" : true } } } } ' Map a type 20 40 /