|
SERVER-18819 introduced string aliases for the $type query operator. Whereas previously you could query for, say, all documents where field a is a NumberLong using
db.coll.find({a: {$type: 18}});
|
now you can use the much more readable
db.coll.find({a: {$type: "long"}});
|
The string alias accepted for each BSONType are listed in SERVER-18819. We need to add these to the $type docs here: http://docs.mongodb.org/manual/reference/operator/query/type/
We should also consider updating http://docs.mongodb.org/manual/reference/bson-types/ to list the short names for each type.
|