[SERVER-59163] Enable partial indexes on time-series collections Created: 06/Aug/21 Updated: 29/Oct/23 Resolved: 21/Jan/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | David Percy | Assignee: | David Percy |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | QO 2021-09-06, QO 2021-09-20, QO 2021-10-04, QO 2021-11-29, QO 2021-12-13, QO 2021-12-27, QO 2022-01-10, QO 2022-01-24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 69 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
When someone creates a partial index on a time-series collection, internally we will create a partial index on the buckets collection. The user specifies the partialFilterExpression as a predicate on events, but we'll translate it to a predicate on buckets. This sounds identical to how we push down $match predicates past the $_internalUnpackBucket stage. We should make sure that logic is factored out into some helper that can be called both from DocumentSource::optimize() and from CmdCreateIndexes. For example:
|
| Comments |
| Comment by Githook User [ 21/Jan/22 ] |
|
Author: {'name': 'David Percy', 'email': 'david.percy@mongodb.com', 'username': 'dpercy'}Message: |
| Comment by Githook User [ 21/Jan/22 ] |
|
Author: {'name': 'David Percy', 'email': 'david.percy@mongodb.com', 'username': 'dpercy'}Message: We will want to use these rewrites when creating a partial index. But to |
| Comment by David Percy [ 13/Oct/21 ] |
|
When we generate the bucket-level partialFilterExpression, we should use the simpler rewrite implemented in |