Time series collections efficiently store sequences of measurements over a period of time.时间序列集合有效地存储了一段时间内的测量序列。
Limitations局限性
The following restrictions and limitations apply when creating a time series collection:创建时间序列集合时,以下限制和约束适用:
Custom collation is the only Advanced Collection Option that you can use with your time series collection.“自定义排序规则”是唯一可用于时间序列集合的高级集合选项。See Time Series Collection Limitations for all time series collection limitations.有关所有时间序列集合限制,请参阅时间序列集合局限性。
Procedure过程
Click the Create Collection button.单击“创建集合”按钮。
From the Collections screen, click the Create Collection button.在“集合”屏幕中,单击“创建集合”按钮。
Specify a timeField.指定一个“时间字段”。
Specify which field should be used as the 指定应将哪个字段用作时间序列集合的timeField for the time-series collection. This field must have a BSON type date.timeField。此字段必须具有BSON类型的日期。
Optional. Specify a metaField.可选。指定一个元字段。
Specify the name of the field that contains metadata in each time series document. The metadata in the specified field should be data that is used to label a unique series of documents.指定每个时间序列文档中包含元数据的字段的名称。指定字段中的元数据应该是用于标记一系列唯一文档的数据。
Optional. Select a granularity from the dropdown.可选。从下拉列表中选择“粒度”。
Specify a coarser granularity so measurements over a longer time span can be more efficiently stored and queried. The default value is 指定更粗的粒度,以便更有效地存储和查询更长时间跨度内的测量值。默认值为"seconds"."seconds"。
If you set the 如果设置了granularity parameter, you can't set the bucketMaxSpanSeconds and bucketRoundingSeconds parameters.granularity(粒度)参数,则无法设置bucketMaxSpanSeconds和bucketRoundingSeconds参数。
Optional. Specify a numeric value for the following fields.可选。为以下字段指定一个数值。
bucketMaxSpanSeconds | number |
|
bucketRoundingSeconds | number |
|
expireAfterSeconds | number |
For more information on time series fields, see Time Series Object Fields.有关时间序列字段的详细信息,请参阅时间序列对象字段。