Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions source/reference/command/moveChunk.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,35 @@ Definition
Internal administrative command. Moves :term:`chunks <chunk>` between
:term:`shards <shard>`. Issue the :dbcommand:`moveChunk` command via
a :program:`mongos` instance while using the :term:`admin database`.
Use the following form:
Use the following forms:

.. code-block:: javascript

db.runCommand( { moveChunk : <namespace> ,
find|bounds : <query|array> ,
find : <query> ,
to : <string>,
_secondaryThrottle : <Boolean> } )
_secondaryThrottle : <boolean> } )

Alternately:

.. code-block:: javascript

db.runCommand( { moveChunk : <namespace> ,
bounds : <array> ,
to : <string>,
_secondaryThrottle : <boolean> } )

The :dbcommand:`moveChunk` command has the following fields:

.. include:: /reference/command/moveChunk-field.rst

The value of ``bounds`` takes the form:

.. code-block:: javascript

[ { hashedField : <minValue> } ,
{ hashedField : <maxValue> } ]

The :ref:`chunk migration <sharding-chunk-migration>` section
describes how chunks move between shards on MongoDB.

Expand Down