Splits a chunk at the shard key value specified by the query.
The method takes the following arguments:
Parameter Type Description
string The namespace (i.e.
<database>.<collection>) of the sharded collection that contains the chunk to split.
document A query document that specifies the shard key value at which to split the chunk.
In most circumstances, you should leave chunk splitting to the
automated processes within MongoDB. However, when initially deploying a
sharded cluster, it may be beneficial to pre-split manually an empty collection using methods such as
sh.splitAt() splits the original chunk into two chunks. One
chunk has a shard key range that starts with the original lower bound
(inclusive) and ends at the specified shard key value (exclusive). The
other chunk has a shard key range that starts with the specified shard
key value (inclusive) as the lower bound and ends at the original upper
To split a chunk at its median point instead, see