[DOCS-15537] Clarify range query behavior within sort order documentation Created: 11/Aug/22  Updated: 30/Oct/23  Resolved: 13/Jul/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Minor - P4
Reporter: Dmitry Ryabtsev Assignee: Sarah Simpers
Resolution: Done Votes: 0
Labels: server-docs-bug-bash
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 1 year, 26 weeks ago
Epic Link: DOCSP-11702
Story Points: 2

 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)


Generated at Thu Feb 08 08:13:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.