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.
- depends on
-
SERVER-12531 $not expression inside $elemMatch causes assertion error
- Closed
- related to
-
SERVER-12684 incorrect result and index not used for $ne with sparse index
- Closed