// indices/put-mapping.asciidoc:527

[source, php]
----
$params = [
    'index' => 'my_index',
    'body' => [
        'mappings' => [
            'properties' => [
                'user_identifier' => [
                    'type' => 'keyword',
                ],
            ],
        ],
    ],
];
$response = $client->indices()->create($params);
----
