1// mapping.asciidoc:144 2 3[source, php] 4---- 5$params = [ 6 'index' => 'my-index', 7 'body' => [ 8 'mappings' => [ 9 'properties' => [ 10 'age' => [ 11 'type' => 'integer', 12 ], 13 'email' => [ 14 'type' => 'keyword', 15 ], 16 'name' => [ 17 'type' => 'text', 18 ], 19 ], 20 ], 21 ], 22]; 23$response = $client->indices()->create($params); 24---- 25