-
Type: New Feature
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
When creating an index on a time-series view, the partial filter expression will be pushed down the same way query predicates are.
- Predicates on metadata are unchanged, except for renaming the field.
- Predicates on measurements become coarser: they use control.min / control.max.
For example, this createIndexes command on the view:
{ createIndexes: "events", indexes: [ { key: { a : 1 }, partialFilterExpression: { $and: [ { 'meta.sensor_type': 'temperature' } { value: { $gt: 70 } }, ] } } ] }
will be equivalent to this command on the underlying buckets collection:
{ createIndexes: "system.buckets.events", indexes: [ { key: { control.min.a : 1, control.max.a : 1 }, partialFilterExpression: { $and: [ { 'meta.sensor_type': 'temperature' } { control.max.value: { $gt: 70 } }, ] } } { key: { control.max.a : 1, control.min.a : 1 }, partialFilterExpression: { $and: [ { 'meta.sensor_type': 'temperature' } { control.max.value: { $gt: 70 } }, ] } } ] }
- depends on
-
SERVER-57765 Allow partial filter expression to use $_internalBucketGeoWithin
- Closed
-
SERVER-59163 Enable partial indexes on time-series collections
- Closed
- related to
-
SERVER-55719 Support partial indexes on time-series metadata
- Closed