1// indices/create-index.asciidoc:123 2 3[source, php] 4---- 5$params = [ 6 'index' => 'test', 7 'body' => [ 8 'settings' => [ 9 'number_of_shards' => 1, 10 ], 11 'mappings' => [ 12 'properties' => [ 13 'field1' => [ 14 'type' => 'text', 15 ], 16 ], 17 ], 18 ], 19]; 20$response = $client->indices()->create($params); 21---- 22