The $elemMatch value is considered indexable, causing the server to erroneously try to build index bounds for the "$size: 3" predicate.
> t = db.t test.t > t.drop() 2014-03-21T14:16:28.601-0400 trying reconnect to 127.0.0.1:27017 (127.0.0.1) failed 2014-03-21T14:16:28.602-0400 reconnect 127.0.0.1:27017 (127.0.0.1) ok true > t.ensureIndex({a: 1}) { "createdCollectionAutomatically" : true, "numIndexesBefore" : 1, "numIndexesAfter" : 2, "ok" : 1 } > t.find({a: {$elemMatch: {$size: 3, $gt: 2}}}) 2014-03-21T14:17:02.525-0400 DBClientCursor::init call() failed Error: error doing query: failed
- is related to
-
SERVER-12531 $not expression inside $elemMatch causes assertion error
- Closed