In this guide, you can learn about time series collections in the MongoDB Node.js driver.
We recommend that you create a time series collection using the MongoDB Shell
mongosh). For detailed instructions on creating a time series collection
using the MongoDB Shell, see our
MongoDB Manual entry on time series collections.
Since you query a time series collection in the same way you query other collection types in MongoDB, the Node.js driver has no features specifically for querying time series data.
For more information on querying data in the MongoDB Node.js driver, see the following resources:
MongoDB version 5.0 introduces window functions into the MongoDB aggregation framework. You can use window functions to perform operations on a contiguous span of time series data. For more information, see the reference documentation for the $setWindowFields aggregation stage.