-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:
-
Environment:
*Location*: http://docs.mongodb.org/manual/reference/operator/query/type/
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36
*Referrer*: https://www.google.com/
*Screen Resolution*: 1440 x 900
*repo*: docs
*source*: reference/operator/query/type
*Location*: http://docs.mongodb.org/manual/reference/operator/query/type/ *User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36 *Referrer*: https://www.google.com/ *Screen Resolution*: 1440 x 900 *repo*: docs *source*: reference/operator/query/type
It appears you can also use $type with a string argument that describes the data type, e.g.
{"$type" : "string"} {"$type": "int"}
(I saw this in the 3.2 training lesson on document validation and had never heard of it before.)
This needs to be documented.