Details
-
Task
-
Resolution: Done
-
Minor - P4
-
None
Description
Original description
Running a range query with null does not yield any results. Whereas the expected result would be that any values but null or undefined should be retrieved, as per the BSON sort order https://www.mongodb.com/docs/v4.4/reference/bson-type-comparison-order/
Triage addition
Can we please add a note to the following effect in the introduction of https://www.mongodb.com/docs/v4.4/reference/bson-type-comparison-order/:
This page describes the behavior of sort operations. Range query and aggregation operators only perform comparisons on fields where the BSON type matches the query value's type. MongoDB supports limited cross-BSON comparison through Type Bracketing.
(Most of this language is cribbed directly from: https://www.mongodb.com/docs/v4.4/reference/operator/query/gt)