0

Am working on ES to create some new index in ES by limiting the shard number using below command

curl  -XPUT localhost:9200/es_test_index  '{ "settings : { "number_of_shards" ; 2 } }'

but there is small issue the index is getting created but no with shard as 2 instead with the default shard count 5. Can anyone please tell me how to change this.

AM working on ES 5.1.1

Thanks

Adarsh H D Dev
  • 588
  • 7
  • 29

1 Answers1

0

You have a typo you need to use : instead of ; plus you're missing the -d switch , try like this instead:

curl  -XPUT localhost:9200/es_test_index -d '{ "settings : { "number_of_shards": 2 } }'
                                          ^                                  ^
                                          |                                  |
                                       add this                           fix this
Val
  • 207,596
  • 13
  • 358
  • 360