@@ -34,13 +34,13 @@ content: |
3434 ...
3535
3636 ---
37- title : Shard the collection.
38- ref : new-sharded-tsc-create
37+ title : Create a hashed index on your collection.
38+ ref : new-sharded-tsc-index
3939stepnum : 3
4040level : 4
4141content : |
42- Use the :method:`~sh.shardCollection()` method to shard the
43- collection .
42+ Enable sharding on your collection by creating an index that supports
43+ the :ref:`shard key <shard-key>` .
4444
4545 Consider a time series collection with the following properties:
4646
@@ -67,11 +67,28 @@ content: |
6767 "speed": 50
6868 } )
6969
70- To shard the collection, run the following command:
70+ Run the following command to create a hashed index on the
71+ ``metadata.location`` field:
72+
73+ .. code-block:: javascript
74+
75+ db.deliverySensor.createIndex( { "metadata.location" : "hashed" } )
76+
77+ ---
78+ title : Shard your collection.
79+ ref : new-sharded-tsc-create
80+ stepnum : 4
81+ level : 4
82+ content : |
83+ Use the :method:`~sh.shardCollection()` method to shard the
84+ collection.
85+
86+ To shard the ``deliverySensor`` collection described in the preceding step, run
87+ the following command:
7188
7289 .. code-block:: javascript
7390
74- sh.shardCollection( "test.deliverySensor", { "metadata.location": 1 } )
91+ sh.shardCollection( "test.deliverySensor", { "metadata.location": "hashed" } )
7592
7693 In this example, :method:`sh.shardCollection()`:
7794
0 commit comments