Skip to content

Commit 04d3926

Browse files
authored
DOCS-15731 Add drop/hide note to sharding key page (#2332)
* DOCS-15731 Add drop/hide note to sharding key page * spaces * verbiage * internal feedback 1 * External review feedback 1
1 parent 95244aa commit 04d3926

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

source/core/sharding-shard-key.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ All sharded collections **must** have an index that supports the
4747
- If the collection is not empty, you must create the index first
4848
before using :method:`sh.shardCollection()`.
4949

50-
If you drop the last valid index for the shard key, recover by
51-
recreating an index on just the shard key.
50+
You cannot :ref:`drop <collection-drop-index>` or
51+
:ref:`hide <collection-hide-index>` an index if it is the only
52+
non-hidden index that supports the shard key.
5253

5354
.. _sharding-shard-key-unique:
5455

source/reference/method/db.collection.dropIndex.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _collection-drop-index:
2+
13
=========================
24
db.collection.dropIndex()
35
=========================

source/reference/method/db.collection.hideIndex.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _collection-hide-index:
2+
13
=========================
24
db.collection.hideIndex()
35
=========================

0 commit comments

Comments
 (0)