Details
-
Task
-
Resolution: Done
-
Major - P3
-
None
-
None
Description
A query like {_id: {$gt: 2}} doesn't mean to find all documents with an _id field that compares greater than the number 2. Instead, it means to field documents where the _id field is a number that compares greater than 2. This implicit restriction of comparison predicates to a particular canonical type is called "type bracketing". If we don't have explicit documentation for this behavior already, then we should add some.
See SERVER-22308 for an example of how this could cause confusion.
Attachments
Issue Links
- related to
-
DOCS-7716 Range query operators ($gt, $lt, etc) between BSON types unsupported
-
- Closed
-
-
SERVER-22308 query in collection which has different type filed, just return one same type res
-
- Closed
-