// indices/put-mapping.asciidoc:417

[source, php]
----
$params = [
    'index' => 'users',
    'body' => [
        'mappings' => [
            'properties' => [
                'user_id' => [
                    'type' => 'long',
                ],
            ],
        ],
    ],
];
$response = $client->indices()->create($params);
----
