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