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