// indices/put-mapping.asciidoc:171

[source, php]
----
$params = [
    'index' => 'my_index',
    'body' => [
        'properties' => [
            'name' => [
                'properties' => [
                    'last' => [
                        'type' => 'text',
                    ],
                ],
            ],
        ],
    ],
];
$response = $client->indices()->putMapping($params);
----
