File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 68
68
69
69
The ``_id`` index is a :ref:`unique index <index-type-unique>`
70
70
[#unique-index-report]_ on the ``_id`` field, and MongoDB creates this
71
- index by default on all collections, except for capped collections . [#capped-collections]_
71
+ index by default on all collections. [#capped-collections]_
72
72
You cannot delete the index on ``_id``.
73
73
74
74
The ``_id`` field is the :term:`primary key` for the collection, and
@@ -90,12 +90,11 @@ is a 12-byte unique identifiers suitable for use as the value of an
90
90
the :func:`getIndexes() <db.collection.getIndexes()>` method will
91
91
*not* print ``unique: true`` in the :program:`mongo` shell.
92
92
93
- .. [#capped-collections] Capped collections are special collections
94
- that do not have an ``_id`` index by default. If you specify
95
- ``autoIndexId: true`` when creating a capped collection MongoDB will
96
- create an ``_id`` index on this collection. Replica set members may
97
- create ``_id`` indexes on capped collections during the replication
98
- process.
93
+ .. [#capped-collections] Before version 2.2 capped collections did not
94
+ have an ``_id`` field by default. In 2.2, all capped collections
95
+ have an ``_id`` field, except those in the ``local``
96
+ :term:`database`. See the :ref:`release notes
97
+ <2.2-id-indexes-capped-collections>` for more information.
99
98
100
99
.. TODO fix the above when a full capped-collection page exists.
101
100
Original file line number Diff line number Diff line change @@ -382,6 +382,8 @@ Additional Improvements
382
382
use and state. In previous versions, these data were sampled. See
383
383
:issue:`SERVER-5784` and :status:`indexCounters` for more information.
384
384
385
+ .. _2.2-id-indexes-capped-collections:
386
+
385
387
``_id`` Indexes on Capped Collections
386
388
`````````````````````````````````````
387
389
You can’t perform that action at this time.
0 commit comments