For completeness:
db.test.find({$nor: [{"colour.r": {$lte: 0}}, {"colour.r": {$gte: 100}}]})
$nor will match all documents that invoke expressions.
Here you do not need to explicitly check the null value, since it is not more or less than any number - therefore, tests will not pass, like any number in the range (0,100) 1
<sub> 1 Exclusive. If you need to find every document in the range [0,100] inclusive, replace $gte (respectively $lte ) with $gt (respectively $lt ).
source share