Skip to content

Commit dc54b38

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 d099274 commit dc54b38

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
@@ -114,15 +114,15 @@ You must use fields contained in the :term:`shard key` when defining a new
114114
range for a zone to cover. If using a :term:`compound <compound index>` shard
115115
key, the range must include the prefix of the shard key.
116116

117-
For example, given a shard key ``{ a : 1, b : 2, c : 3 }``, creating or
118-
updating a zone to cover values of ``b`` requires including ``a`` as the
119-
prefix. Creating or updating a zone to covers values of ``c`` requires
117+
For example, given a shard key ``{ a : 1, b : 1, c : 1 }``, creating or
118+
updating a range to cover values of ``b`` requires including ``a`` as the
119+
prefix. Creating or updating a range to covers values of ``c`` requires
120120
including ``a`` and ``b`` as the prefix.
121121

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

127127
When choosing a shard key for a collection, consider what fields you might
128128
want to use for configuring zones. After sharding, you cannot change the

0 commit comments

Comments
 (0)