Create a Time Series Collection创建时间序列集合
On this page本页内容
Time series collections efficiently store sequences of measurements over a period of time.时间序列集合有效地存储一段时间内的测量序列。
Procedure过程
1
3
4
Specify a timeField.指定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类型的日期。
The following fields are optional:以下字段是可选的:
| metaField | string | |
| granularity | string | "seconds"."seconds"。granularityparameter, you can't set thebucketMaxSpanSecondsandbucketRoundingSecondsparameters.granularity参数,则无法设置bucketMaxSpanSeconds和bucketRoundingSeconds参数。 | 
| expireAfterSeconds | number | |
| bucketMaxSpanSeconds | number | bucketMaxSpanSecondsmust be the same asbucketRoundingSeconds.bucketMaxSpanSeconds的值必须与bucketRoundingSeconds相同。bucketMaxSpanSeconds, parameter, you can't set thegranularityparameter.bucketMaxSpanSeconds参数,则无法设置granularity参数。 | 
| bucketRoundingSeconds | number | bucketRoundingSecondsmust be the same asbucketMaxSpanSeconds.bucketRoundingSeconds的值必须与bucketMaxSpanSeconds相同。bucketRoundingSeconds, parameter, you can't set thegranularityparameter. | 
For more information on time series fields, see Time Series Object Fields.有关时间序列字段的详细信息,请参阅时间序列对象字段。
Restrictions and Limitations限制和局限性
The following restrictions and limitations apply when creating a time series collection:创建时间序列集合时,以下限制和限制适用:
- Custom collation is the only Advanced Collection Option that can be used alongside your time series collation.“自定义排序规则”是唯一可以与时间序列排序规则一起使用的“高级集合选项”。
- See Time Series Collection Limitations for all time series collection limitations.请参阅时间序列集合限制以了解所有时间序列集合的限制。