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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.5.5
    • Fix Version/s: 2.6.0-rc0
    • Component/s: Querying
    • Labels:
    • Operating System:
      ALL

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: