Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-69680

allow $expr with comparison bounded by value and $type to use a non-multikey index

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization

      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"]}]}});
      

            Assignee:
            daniel.segel@mongodb.com Daniel Segel
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: