OPTIONS

sh.splitFind()

Definition

sh.splitFind(namespace, query)

Splits the chunk containing the document specified by the query at its median point, creating two roughly equal chunks. Use sh.splitAt() to split a collection in a specific point.

In most circumstances, you should leave chunk splitting to the automated processes. However, when initially deploying a sharded cluster it is necessary to perform some measure of pre-splitting using manual methods including sh.splitFind().

Parameter Type Description
namespace string The namespace (i.e. <database>.<collection>) of the sharded collection that contains the chunk to split.
query document A query to identify a document in a specific chunk. Typically specify the shard key for a document as the query.
ON THIS PAGE