-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
Documentation Request Summary:
The $type query operator can now accept an array of types. For instance, the query
db.coll.find({telephone: {$type: ["number", "string"]}});
matches as long as the type of the telephone field is either a number or a string. The elements of the array can be either string aliases or numerical type codes. The following query uses numerical type codes to find documents where num is either NumberInt or NumberLong:
db.coll.find({num: {$type: [16, 18]}};
- documents
-
SERVER-30245 Extend JSON Schema parser to handle the type keyword containing an array of types
- Closed