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