MongoDB How to use $not, $and/$or with $type? -
i have different data types same field name f
with this reference,
i want find records not double , not null
i'm able find records not double by
db.foo.find({ f:{$not:{$type:1}} }) but can not combine query not null
tried with
db.foo.find({f:{$not:{$and:[{$type:1},{$type:10}]}}})' db.foo.find({$and:[{f:{$not:{$type:1}}}, {f:{$not:{$type:10}}}] }) but fails
any ?
what want $nor condition
db.foo.find({ $nor:[ { f: {$type:1} }, { f: null }] }) which means none of included arguments true. not simplified usage of finding null value.
Comments
Post a Comment