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