[SERVER-69680] allow $expr with comparison bounded by value and $type to use a non-multikey index Created: 14/Sep/22  Updated: 05/Dec/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: James Wahlin Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-34926 allow $expr with comparison bounded o... Closed
Assigned Teams:
Query Optimization
Participants:

 Description   

For example for the following query, we generate bounds from MinKey to the date specified, rather than restrict bounds to only include BSON type Date.

db.c.find({$expr: {$and: [{$lt: ["$x", ISODate("2022-09-14T00:00:00Z")]}, {$eq: [{$type: "$x"}, "date"]}]}});


Generated at Thu Feb 08 06:14:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.