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

Negate index bounds for $not instead of defaulting to a collection scan

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.0-rc0
    • Affects Version/s: 2.5.5
    • Component/s: Querying
    • Labels:
    • ALL

      For a query like

       { a: { $elemMatch: { $gt:4, $not: { $gte:6 } } } } 

      the index bounds for an index on "a" should be (4, 6). When handling the $not, we should invert the bounds of its predicate to determine its bounds.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            samantha.ritter@mongodb.com Samantha Ritter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: