create an index in elasticsearch 1 code example
Example 1: elastic create index
PUT /my-index-000001
// or with curl
curl -X PUT "localhost:9200/my-index-000001?pretty"
Example 2: how to define sharding while creating an index in elasticsearch
PUT /my-index-000001
{
"settings": {
"index": {
"number_of_shards": 3,
"number_of_replicas": 2
}
}
}