Skip to content

Commit 7a7f099

Browse files
DOCSP-23735 Collections Sub-pages (#418)
* DOCSP-23735 capped collection and page creation * DOCSP-23735 fixing procedure structure * DOCSP-23735 collation collection page * DOCSP-23735 time series collection page * DOCSP-23735 time series collection page * DOCSP-23735 Queryable Encryption * DOCSP-23735 Queryable Encryption * DOCSP-23735 add banner * DOCSP-23735 collections landing page * DOCSP-23735 test push * DOCSP-23735 added example * DOCSP-23735 added example * DOCSP-23735 nit change * DOCSP-23735 tech changes * DOCSP-23735 nit change * DOCSP-23735 fixed note on custom collation * DOCSP-23735 rewording
1 parent f4cc903 commit 7a7f099

8 files changed

Lines changed: 346 additions & 2 deletions

File tree

snooty.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ intersphinx = [
88
]
99

1010
toc_landing_pages = ["/install", "/connect", "/instance", "/query/filter", "/query/queries",
11-
"/documents", "/schema", "/aggregation-pipeline-builder"]
11+
"/documents", "/schema", "/aggregation-pipeline-builder", "collections"]
1212

1313
[constants]
1414
download-page = "`downloads page <https://www.mongodb.com/download-center/compass?tck=docs_compass>`__"
@@ -18,6 +18,7 @@ current-version = "1.32.3"
1818
targets = [
1919
"connect/in-use-encryption.txt",
2020
"in-use-encryption-tutorial.txt",
21+
"collections/encrypted-collection.txt",
2122
]
2223

2324
variant = "danger"

source/collections.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,11 @@ Limitations
145145
connected to a :atlas:`Data Lake </data-lake>`.
146146

147147
.. |home| unicode:: U+2302
148+
149+
.. toctree::
150+
:titlesonly:
151+
152+
/collections/capped-collection
153+
/collections/collation-collection
154+
/collections/time-series-collection
155+
/collections/encrypted-collection
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.. _capped-collection:
2+
3+
==========================
4+
Create a Capped 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:`Capped Collections </core/capped-collections/>` are fixed-sized
16+
collections that support high-throughput operations that insert and retrieve
17+
documents based on insertion order.
18+
19+
Procedure
20+
---------
21+
22+
.. procedure::
23+
:style: connected
24+
25+
.. step:: Click the :guilabel:`Create Collection` button.
26+
27+
From the :guilabel:`Collections` screen, click the
28+
:guilabel:`Create Collection` button.
29+
30+
.. step:: Enter the collection name.
31+
32+
.. step:: Click the :guilabel:`Advanced Collection Options` dropdown.
33+
34+
Check the :guilabel:`Capped Collection` option.
35+
36+
.. step:: Enter the :guilabel:`size` of the capped collection.
37+
38+
Enter the maximum number of bytes that the collection can hold.
39+
40+
.. step:: Click :guilabel:`Create Collection` to create the collection.
41+
42+
Restrictions and Limitations
43+
----------------------------
44+
45+
The following restrictions and limitations apply when creating a
46+
capped collection:
47+
48+
- :guilabel:`Custom collation` is the only :guilabel:`Advanced Collection Option`
49+
that can be used alongside your capped collection.
50+
51+
- If you import a data set larger than the maximum size of the capped collection,
52+
|compass-short| only loads the last documents of the data set and drops the oldest
53+
documents.
54+
55+
- Once the collection is created, you cannot adjust the maximum number of bytes.
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
.. _collation-collection:
2+
3+
==================================
4+
Create a Collection with Collation
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:`Collation </reference/collation/>` allows you to specify
16+
language-specific rules for string comparison, such as rules for lettercase
17+
and accent marks.
18+
19+
Procedure
20+
---------
21+
22+
.. procedure::
23+
:style: connected
24+
25+
.. step:: Click the :guilabel:`Create Collection` button.
26+
27+
From the :guilabel:`Collections` screen, click the
28+
:guilabel:`Create Collection` button.
29+
30+
.. step:: Enter the collection name.
31+
32+
.. step:: Click the :guilabel:`Advanced Collection Options` dropdown.
33+
34+
Check the :guilabel:`Use Custom Collaton` option.
35+
36+
.. step:: Select a value for :guilabel:`locale`.
37+
38+
You are required to select a :guilabel:`locale` from the :manual:`MongoDB
39+
supported languages </reference/collation-locales-defaults/#supported-languages-and-locales>`.
40+
41+
All other collation options parameters are optional. For descriptions of
42+
the fields, see :manual:`Collation </reference/collation/>`.
43+
44+
.. step:: Click :guilabel:`Create Collection` to create the collection.
45+
46+
Restrictions and Limitations
47+
----------------------------
48+
49+
The following restrictions apply when the parameter ``numericOrdering``
50+
is set to ``true``:
51+
52+
- Only contiguous non-negative integer substrings of digits are
53+
considered in the comparisons. ``numericOrdering`` does not support:
54+
55+
- ``+``
56+
- ``-``
57+
- exponents
58+
59+
- Only Unicode code points in the Number or Decimal Digit (Nd) category
60+
are treated as digits.
61+
62+
- If the number length exceeds 254 characters, the excess characters are
63+
treated as a separate number.
64+
65+
Example
66+
~~~~~~~
67+
68+
Consider a collection with the following string number and decimal values:
69+
70+
.. code-block:: javascript
71+
72+
[
73+
{ "n": "1" },
74+
{ "n": "2" },
75+
{ "n": "-2.1" },
76+
{ "n": "2.0" },
77+
{ "n": "2.20" },
78+
{ "n": "10"},
79+
{ "n": "20" },
80+
{ "n": "20.1" },
81+
{ "n": "-10" },
82+
{ "n": "3" }
83+
]
84+
85+
The following find query uses a collation document containing the
86+
``numericOrdering`` parameter:
87+
88+
.. code-block:: javascript
89+
90+
db.c.find(
91+
{ }, { _id: 0 }
92+
).sort(
93+
{ n: 1 }
94+
).collation( {
95+
locale: 'en_US',
96+
numericOrdering: true
97+
} )
98+
99+
For more information on querying documents in |compass-short|, see
100+
:ref:`Query Your Data <compass-query-bar>`.
101+
102+
The operations returns the following results:
103+
104+
.. code-block:: javascript
105+
:emphasize-lines: 2, 3
106+
107+
[
108+
{ "n": "-2.1" },
109+
{ "n": "-10" },
110+
{ "n": "1" },
111+
{ "n": "2" },
112+
{ "n": "2.0" }
113+
{ "n": "2.20" },
114+
{ "n": "3" },
115+
{ "n": "10" },
116+
{ "n": "20" },
117+
{"n": "20.1" }
118+
]
119+
120+
- ``numericOrdering: true`` sorts the string values in ascending order as if
121+
they were numeric values.
122+
123+
- The two negative values ``-2.1`` and ``-10`` are not sorted in the
124+
expected sort order because they have unsupported ``-`` characters.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
.. _encrypted-collection:
2+
3+
=============================================
4+
Create a Collection with Queryable Encryption
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:`Queryable Encryption </core/queryable-encryption/>` allows you to
16+
encrypt a subset of fields in your collection.
17+
18+
Procedure
19+
---------
20+
21+
.. procedure::
22+
:style: connected
23+
24+
.. step:: Click the :guilabel:`Create Collection` button.
25+
26+
From the :guilabel:`Collections` screen, click the
27+
:guilabel:`Create Collection` button.
28+
29+
.. step:: Enter the collection name.
30+
31+
.. step:: Click the :guilabel:`Advanced Collection Options` dropdown.
32+
33+
Check the :guilabel:`Queryable Encryption` option.
34+
35+
.. step:: Specify an :guilabel:`Encrypted Field`.
36+
37+
Specify which fields should be encrypted and whether they should
38+
be queryable.
39+
40+
The following fields must be used if no existing keyId was specified for
41+
at least one encrypted field, and have no effect otherwise:
42+
43+
- :manual:`KMS Provider </core/queryable-encryption/fundamentals/kms-providers/>`.
44+
45+
- :manual:`Key Encryption Key </core/queryable-encryption/fundamentals/keys-key-vaults/>`.
46+
47+
.. step:: Click :guilabel:`Create Collection` to create the collection.
48+
49+
Your collection will be marked by a :guilabel:`Queryable Encryption`
50+
badge.
51+
52+
Restrictions and Limitations
53+
----------------------------
54+
55+
- Your deployment must be connected using In-Use Encryption to encrypt your
56+
collection using Queryable Encryption.
57+
58+
- :guilabel:`Custom collation` is the only :guilabel:`Advanced Collection Option`
59+
that can be used alongside Queryable Encryption.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
.. _time-series-collection:
2+
3+
===============================
4+
Create a Time Series 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:`Time series collections </core/timeseries-collections/>` efficiently
16+
store sequences of measurements over a period of time.
17+
18+
Procedure
19+
---------
20+
21+
.. procedure::
22+
:style: connected
23+
24+
.. step:: Click the :guilabel:`Create Collection` button.
25+
26+
From the :guilabel:`Collections` screen, click the
27+
:guilabel:`Create Collection` button.
28+
29+
.. step:: Enter the collection name.
30+
31+
.. step:: Click the :guilabel:`Advanced Collection Options` dropdown.
32+
33+
Check the :guilabel:`Time Series Collection` option.
34+
35+
.. step:: Specify a :guilabel:`timeField`.
36+
37+
Specify which field should be used as the ``timeField`` for the time-series
38+
collection. This field must have a :manual:`BSON type date </reference/bson-types/>`.
39+
40+
The following fields are optional:
41+
42+
.. list-table::
43+
:header-rows: 1
44+
:widths: 50 50
45+
46+
* - Field
47+
- Description
48+
49+
* - ``metaField``
50+
- The name of the field which contains metadata in each time series
51+
document. The metadata in the specified field should be data that
52+
is used to label a unique series of documents.
53+
54+
* - ``granularity``
55+
- The ``granularity`` field allows specifying a coarser granularity so
56+
measurements over a longer time span can be more efficiently stored
57+
and queried.
58+
59+
The default value is set to ``seconds``.
60+
61+
* - ``expireAfterSeconds``
62+
- The ``expireAfterSeconds`` field enables automatic deletion of
63+
documents older than the specified number of seconds.
64+
65+
For more information on time series fields, see
66+
:manual:`Time Series Collections </core/timeseries-collections/>`.
67+
68+
.. step:: Click :guilabel:`Create Collection` to create the collection.
69+
70+
Your collection will be marked by a :guilabel:`time series` badge. On the
71+
left-hand navigation bar your time series collection will have the
72+
following icon:
73+
74+
.. figure:: /images/compass/time-series-badge.png
75+
:figwidth: 450 px
76+
:alt: Time Series Icon
77+
78+
Restrictions and Limitations
79+
----------------------------
80+
81+
The following restrictions and limitations apply when creating a time series
82+
collection:
83+
84+
- :guilabel:`Custom collation` is the only :guilabel:`Advanced Collection Option`
85+
that can be used alongside your time series collation.
86+
87+
- See :manual:`Time Series Collection Limitations </core/timeseries/timeseries-limitations/>`
88+
for all time series collection limitations.
13.5 KB
Loading

source/includes/steps-create-collection.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,16 @@ content: |
1212
In the :guilabel:`Create Collection` dialog, enter the name of the
1313
collection to create.
1414
15-
.. include:: /includes/collection-options.rst
15+
|compass-short| also provides you with :guilabel:`Advanced Collection Options`.
16+
You can select from the following:
17+
18+
- :ref:`Create a Capped Collection <capped-collection>`
19+
20+
- :ref:`Create a Collection with Collation <collation-collection>`
21+
22+
- :ref:`Create a Time Series Collection <time-series-collection>`
23+
24+
- :ref:`Create a Collection with Encrypted Fields <encrypted-collection>`
1625
---
1726
title: Click :guilabel:`Create Collection` to create the collection.
1827
level: 4

0 commit comments

Comments
 (0)