@@ -20,32 +20,30 @@ Definition
2020 The :method:`sh.reshardCollection()` method changes the shard key for
2121 a collection and changes the distribution of your data.
2222
23+ Before you reshard a collection, read the the :ref:`reshard
24+ requirements <reshard-requirements>` and :ref:`reshard limitations
25+ <resharding-limitations>`.
26+
2327 .. |dbcommand| replace:: :dbcommand:`reshardCollection` command
2428 .. include:: /includes/fact-mongosh-shell-method-alt.rst
2529
26- :method:` sh.reshardCollection()` takes the following arguments :
30+ `` sh.reshardCollection()`` takes the following fields :
2731
2832 .. list-table::
2933 :header-rows: 1
3034 :widths: 20 20 80
3135
32- * - Parameter
33-
36+ * - Field
3437 - Type
35-
3638 - Description
3739
3840 * - ``namespace``
39-
4041 - string
41-
4242 - The :term:`namespace` of the collection to shard in the form
4343 ``"<database>.<collection>"``.
4444
4545 * - ``key``
46-
4746 - document
48-
4947 - The document that specifies the new field or fields to use as the
5048 :ref:`shard key <sharding-shard-key>`.
5149
@@ -54,44 +52,34 @@ Definition
5452 Set the field values to either:
5553
5654 - ``1`` for :doc:`ranged based sharding </core/ranged-sharding>`
57-
5855 - ``"hashed"`` to specify a
5956 :ref:`hashed shard key <hashed-shard-keys>`.
6057
6158 See also :ref:`sharding-shard-key-indexes`
6259
6360 * - ``unique``
64-
6561 - boolean
66-
6762 - Optional. Specify whether there is a :doc:`uniqueness
6863 </core/index-unique>` constraint on the shard key. Only
6964 ``false`` is supported. Defaults to ``false``.
7065
7166 * - ``options``
72-
7367 - document
74-
7568 - Optional. A document containing optional fields, including
7669 ``numInitialChunks``, ``collation`` and ``zones``.
7770
78-
79- The ``options`` argument supports the following options:
71+ The ``options`` field supports the following fields:
8072
8173.. list-table::
8274 :header-rows: 1
8375 :widths: 20 20 80
8476
85- * - Parameter
86-
77+ * - Field
8778 - Type
88-
8979 - Description
9080
9181 * - ``numInitialChunks``
92-
9382 - integer
94-
9583 - Optional. Specifies the initial number of chunks to create
9684 across all shards in the cluster when resharding a collection.
9785 The default is the number of chunks that exist for the
@@ -100,22 +88,19 @@ The ``options`` argument supports the following options:
10088 ``numInitialChunks`` must result in less than ``8192`` per shard.
10189
10290 * - ``collation``
103-
10491 - document
105-
10692 - Optional. If the collection specified to ``reshardCollection``
10793 has a default :ref:`collation <collation>`, you *must* include a
10894 collation document with ``{ locale : "simple" }``, or the
10995 ``reshardCollection`` command fails.
11096
11197 * - ``zones``
112-
11398 - array
114-
11599 - Optional. To maintain or add :ref:`zones <zone-sharding>`,
116100 specify the zones for your collection in an array:
117101
118102 .. code-block:: javascript
103+ :copyable: false
119104
120105 [
121106 {
@@ -168,7 +153,7 @@ During the clone, apply, and catch-up phase:
168153
169154 .. note::
170155
171- If desired , you can manually force the resharding operation to
156+ If required , you can manually force the resharding operation to
172157 complete by issuing the :method:`sh.commitReshardCollection()`
173158 method. This is useful if the current time estimate to complete the
174159 resharding operation is an acceptable duration for your collection
@@ -182,8 +167,8 @@ During the clone, apply, and catch-up phase:
182167Commit Phase
183168~~~~~~~~~~~~
184169
185- - Once the resharding process reaches the commit phase, it may no longer
186- be aborted with :method:`sh.abortReshardCollection()`.
170+ - After the resharding process reaches the commit phase, the process
171+ cannot be ended with :method:`sh.abortReshardCollection()`.
187172- When all shards have reached strict consistency, the resharding
188173 coordinator commits the resharding operation and installs the new
189174 routing table.
@@ -207,11 +192,12 @@ new shard key ``{ order_id: 1 }``:
207192
208193.. code-block:: javascript
209194
210- sh.reshardCollection("sales.orders", { order_id: 1 })
195+ sh.reshardCollection( "sales.orders", { order_id: 1 } )
211196
212- MongoDB returns the following :
197+ Example output :
213198
214199.. code-block:: javascript
200+ :copyable: false
215201
216202 {
217203 ok: 1,
0 commit comments