[Docs] Correct README example snippet (#45133)
The example tries to create a new index but the create index API requires the "settings" parameter to be there. Closes #45129
This commit is contained in:
parent
a1f0285f0e
commit
47386d4f0a
|
@ -150,14 +150,14 @@ curl -XPUT 'http://localhost:9200/kimchy/_doc/2?pretty' -H 'Content-Type: applic
|
|||
|
||||
The above will index information into the @kimchy@ index. Each user will get their own special index.
|
||||
|
||||
Complete control on the index level is allowed. As an example, in the above case, we would want to change from the default 5 shards with 1 replica per index, to only 1 shard with 1 replica per index (== per twitter user). Here is how this can be done (the configuration can be in yaml as well):
|
||||
Complete control on the index level is allowed. As an example, in the above case, we might want to change from the default 1 shards with 1 replica per index, to 2 shards with 1 replica per index (because this user tweets a lot). Here is how this can be done (the configuration can be in yaml as well):
|
||||
|
||||
<pre>
|
||||
curl -XPUT http://localhost:9200/another_user?pretty -H 'Content-Type: application/json' -d '
|
||||
{
|
||||
"index" : {
|
||||
"number_of_shards" : 1,
|
||||
"number_of_replicas" : 1
|
||||
"settings" : {
|
||||
"index.number_of_shards" : 2,
|
||||
"index.number_of_replicas" : 1
|
||||
}
|
||||
}'
|
||||
</pre>
|
||||
|
|
Loading…
Reference in New Issue