// mapping.asciidoc:147

[source, php]
----
$params = [
    'index' => 'my-index',
    'body' => [
        'mappings' => [
            'properties' => [
                'age' => [
                    'type' => 'integer',
                ],
                'email' => [
                    'type' => 'keyword',
                ],
                'name' => [
                    'type' => 'text',
                ],
            ],
        ],
    ],
];
$response = $client->indices()->create($params);
----
