- PHP Client: other versions:
- Overview
- Quickstart
- Installation
- Configuration
- Index Operations
- Indexing Operations
- Search Operations
- The Connection Pool
IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Create an index
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Create an index
editOk, now that we are starting fresh, let’s add a new index with some custom settings:
$indexParams['index'] = 'my_index'; $indexParams['body']['settings']['number_of_shards'] = 2; $indexParams['body']['settings']['number_of_replicas'] = 0; $client->indices()->create($indexParams);
Was this helpful?
Thank you for your feedback.