In some cases it is possible to query for the undefined type. If full document matching is bypassed, such a query can match an empty array, which is stored in the index using the undefined type.
> c.ensureIndex( { a:1 } )
> c.save( { a:[] } )
> c.find( { a:{ $in:[ undefined ] } } )
{ "_id" : ObjectId("4f7a117c37365e9167f24ed3"), "a" : [ ] }
>
- is related to
-
SERVER-1160 {a: undefined} broken with index
-
- Closed
-
-
SERVER-12024 re-implement $in in terms of $or
-
- Backlog
-
-
SERVER-5063 $in on first compound key element and limit efficiency
-
- Closed
-