Skip to content

Commit f80368c

Browse files
DOCSP-24976 Clustered collection (#426)
* DOCSP-24976 clustered collection * DOCSP-24976 internal review * DOCSP-24976 internal review * DOCSP-24976 fixed first step * DOCSP-24976 added next steps
1 parent 9f9a321 commit f80368c

File tree

5 files changed

+84
-3
lines changed

5 files changed

+84
-3
lines changed

source/collections.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,6 @@ Limitations
151151

152152
/collections/capped-collection
153153
/collections/collation-collection
154-
/collections/time-series-collection
154+
/collections/clustered-collection
155155
/collections/encrypted-collection
156+
/collections/time-series-collection
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
.. _clustered-collection:
2+
3+
=============================
4+
Create a Clustered Collection
5+
=============================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
:manual:`Clustered collections </core/clustered-collections/>` are collections
16+
with a clustered index. Clustered collections store documents ordered by :manual:`clustered index </reference/method/db.createCollection/#std-label-db.createCollection.clusteredIndex>`
17+
key value. You can use clustered collections when only one clustered index is
18+
necessary.
19+
20+
Restrictions
21+
------------
22+
23+
Clustered collection limitations:
24+
25+
- The clustered index key must be on the ``_id`` field.
26+
27+
- Clustered collections may not be :manual:`capped collections <capped-collection>`.
28+
29+
Steps
30+
-----
31+
32+
.. procedure::
33+
:style: connected
34+
35+
.. step:: Open the :guilabel:`Create Collection` dialog box.
36+
37+
Select a database and from the :guilabel:`Collections` screen, click the
38+
:guilabel:`Create Collection` button.
39+
40+
You can also click the ``+`` next to the name of the database you select
41+
to open the :guilabel:`Create Collection` dialog box.
42+
43+
.. figure:: /images/compass/new-collection.png
44+
:figwidth: 550px
45+
:alt: Create New Collection
46+
47+
.. step:: Enter the collection name.
48+
49+
.. step:: Select the type of collection you want to create.
50+
51+
From the :guilabel:`Advanced Collection Options` drop-down, select
52+
:guilabel:`Clustered Collections`.
53+
54+
.. step:: (Optional) Name your clustered index.
55+
56+
You can enter a name for the clustered index or use the automatically
57+
generated name.
58+
59+
.. step:: (Optional) Enter the number of seconds for the :guilabel:`expireAfterSeconds` field.
60+
61+
The :guilabel:`expireAfterSeconds` field is a :manual:`TTL index </tutorial/expire-data/>`
62+
that enables automatic deletion of documents older than the specified
63+
number of seconds. The :guilabel:`expireAfterSeconds` field must be a positive,
64+
non-zero value.
65+
66+
.. step:: Click :guilabel:`Create Collection` to create your new collection.
67+
68+
In the :guilabel:`Collections` screen, your new collection is marked by a
69+
:guilabel:`Clustered` badge next to the collection name.
70+
71+
Next Steps
72+
----------
73+
74+
- :ref:`Manage Documents <compass-documents>`
75+
76+
- :ref:`Query Your Data<compass-query-bar>`
77+
78+
- :ref:`Analyze Your Data Scheme <schema-tab>`
61.4 KB
Loading
115 KB
Loading

source/includes/steps-create-collection.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ content: |
1717
1818
- :ref:`Create a Capped Collection <capped-collection>`
1919
20-
- :ref:`Create a Collection with Collation <collation-collection>`
20+
- :ref:`Create a Clustered Collection <clustered-collection>`
2121
22-
- :ref:`Create a Time Series Collection <time-series-collection>`
22+
- :ref:`Create a Collection with Collation <collation-collection>`
2323
2424
- :ref:`Create a Collection with Encrypted Fields <encrypted-collection>`
25+
26+
- :ref:`Create a Time Series Collection <time-series-collection>`
2527
---
2628
title: Click :guilabel:`Create Collection` to create the collection.
2729
level: 4

0 commit comments

Comments
 (0)