[DOCS-12064] Please specify whether $sort in $push is stable Created: 18/Sep/18  Updated: 30/Oct/23

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

Type: Improvement Priority: Minor - P4
Reporter: Nate Rook Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: sort
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

https://docs.mongodb.com/manual/reference/operator/update/sort/


Participants:
Days since reply: 1 year, 14 weeks, 2 days ago
Epic Link: DOCSP-1769
Story Points: 0.2

 Description   

Description

I was reading this page:

https://docs.mongodb.com/manual/reference/operator/update/sort/

and wanted to know if $sort was stable or not. Unfortunately for me, this information is not on the page. Specifically, I wanted to see either:

"$sort executes a stable sort; if two items in the array are being sorted on the same field, and they have the same value for that field, the earlier item will still be earlier after the sort is done."

Or:

"$sort is not guaranteed to be stable. If two items in the array are being sorted on a field, and they have the same value for that field, their relative positions in the array might be different after the sort is complete."

 

Please include this information in the documentation! Unfortunately I still don't know the answer to the question, so you'll have to investigate whether $sort is supposed to be stable or not.

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Education Bot [ 31/Oct/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

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