On this page
sh.splitFind()
On this page
Definition
sh.splitFind( namespace, query )-
Splits the chunk that contains the shard key value specified by the
queryat the chunk’s median point.sh.splitFind()creates two roughly equal chunks. To split a chunk at a specific point instead, seesh.splitAt().The method takes the following arguments:
Parameter Type Description namespacestring The namespace (i.e. <database>.<collection>) of the sharded collection that contains the chunk to split.querydocument A query document that specifies the shard key value that determines the chunk to split. The
sh.splitFind()method wraps thesplitcommand.
Consideration
In most circumstances, you should leave chunk splitting to the automated processes within MongoDB.
To use sh.splitFind(), the sharded collection must be populated.