1// indices/put-mapping.asciidoc:257 2 3[source, php] 4---- 5$params = [ 6 'index' => 'my_index', 7 'body' => [ 8 'properties' => [ 9 'city' => [ 10 'type' => 'text', 11 'fields' => [ 12 'raw' => [ 13 'type' => 'keyword', 14 ], 15 ], 16 ], 17 ], 18 ], 19]; 20$response = $client->indices()->putMapping($params); 21---- 22