Skip to content

Commit a7987a6

Browse files
authored
Add more detail about metadata and the metaField (#5527)
* Add more detail about metadata and omitting this field. * add newline * external review changes * rewording and moving to an include
1 parent 616857e commit a7987a6

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
Optional. The name of the field which contains metadata in each
2-
time series document. The metadata in the specified field should
3-
be data that is used to label a unique series of documents. The
4-
metadata should rarely, if ever, change.
1+
Optional. The name of the field which contains metadata in
2+
each time series document. The metadata in the specified field
3+
should be data that is used to label a unique series of
4+
documents. The metadata should rarely, if ever, change
5+
The name of the specified field may not be ``_id`` or the same
6+
as the ``timeseries.timeField``. The field can be of any type
7+
except array.
58

6-
The name of the specified field may not be ``_id`` or the same as
7-
the ``timeseries.timeField``. The field can be of any type.
9+
Although the ``metaField`` field is optional, using metadata can improve
10+
query optimization. For example, MongoDB automatically
11+
:ref:`creates a compound index <timeseries-add-secondary-index>`
12+
on the ``metaField`` and ``timeField`` fields for new collections.
13+
If you do not provide a value for this field, the data is bucketed solely
14+
based on time.

source/reference/command/create.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,7 @@ The ``create`` command has the following fields:
106106

107107
* - ``timeseries.metaField``
108108
- string
109-
- Optional. The name of the field which contains metadata in
110-
each time series document. The metadata in the specified field
111-
should be data that is used to label a unique series of
112-
documents. The metadata should rarely, if ever, change.
113-
114-
The name of the specified field may not be ``_id`` or the same
115-
as the ``timeseries.timeField``. The field can be of any type
116-
except array.
109+
- .. include:: /includes/time-series/fact-meta-field-description.rst
117110

118111
* - ``timeseries.granularity``
119112

0 commit comments

Comments
 (0)