Bucket pattern
Reference group: Schema patterns
What it does
Reduces document count and groups related measurements.
Syntax
Group bounded records by entity/time window
Use case
Telemetry and measurement workloads.
Important notes
Bound bucket size; consider native time-series collections.
Bucket pattern: practical example
{ sensorId: "s-1", bucketStart: ISODate("2026-05-01T10:00:00Z"), readings: [{ at: ISODate("2026-05-01T10:00:01Z"), value: 21.2 }] }💡 Explanation
Reduces document count and groups related measurements.
When to use it
Telemetry and measurement workloads.
Caution
Bound bucket size; consider native time-series collections.
Key Takeaways
- Reduces document count and groups related measurements.
- Typical use: Telemetry and measurement workloads.