Skip to content

Commit 0b8fed8

Browse files
asya999andf-mongodb
authored andcommitted
fixing wording
shard keys don't have values 1, 2, 3... and you define ranges using shard key, not zones, and to use location it has to be first field (not any one field) in the shard key
1 parent 00a744d commit 0b8fed8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source/core/zone-sharding.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,15 @@ You must use fields contained in the :term:`shard key` when defining a new
173173
range for a zone to cover. If using a :term:`compound <compound index>` shard
174174
key, the range must include the prefix of the shard key.
175175

176-
For example, given a shard key ``{ a : 1, b : 2, c : 3 }``, creating or
177-
updating a zone to cover values of ``b`` requires including ``a`` as the
178-
prefix. Creating or updating a zone to covers values of ``c`` requires
176+
For example, given a shard key ``{ a : 1, b : 1, c : 1 }``, creating or
177+
updating a range to cover values of ``b`` requires including ``a`` as the
178+
prefix. Creating or updating a range to covers values of ``c`` requires
179179
including ``a`` and ``b`` as the prefix.
180180

181-
You cannot create zones using fields not included in the shard key. For
181+
You cannot create ranges using fields not included in the shard key. For
182182
example, if you wanted to use zones to partition data based on
183-
geographic location, the shard key would need at least one field that
184-
contained geographic data.
183+
geographic location, the shard key would need the first field to
184+
contain geographic data.
185185

186186
When choosing a shard key for a collection, consider what fields you might
187187
want to use for configuring zones. See :ref:`sharding-internals-choose-shard-key`

0 commit comments

Comments
 (0)