Es 5.0 - reshard index

Hello,

is it possible to reshard old index to new using reindex API?

My index has 5 shards and i want to change it to 2. I tried diffrent combinations using "number_of_shards" but without good result.

curl -XPOST 'localhost:9200/_reindex?pretty' -d'{
"source": {
"index": "test"
},
"dest": {
"index": "test_new",
"number_of_shards": "2"
}
}'

Just create the new index first with new settings (number of shards) then launch reindex task to this index.

It's working, thanks!