[DOCS-13883] Investigate changes in SERVER-30405: add expression to generate a random number Created: 18/Sep/20 Updated: 13/Nov/23 Resolved: 12/Jan/21 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual, Server |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0, 4.4.2, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Backlog - Core Eng Program Management Team | Assignee: | Dave Cuthbert (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Days since reply: | 3 years, 3 weeks, 6 days ago | ||||||||
| Epic Link: | DOCSP-9747 | ||||||||
| Story Points: | 5 | ||||||||
| Description |
DescriptionDownstream Change Summary We added a new expression, {$rand:{}} which generates a random number between 0 and 1 (as a float). It takes no arguments. $rand returns a different value every time it is called. If instead you want to pick a single random number to use for the whole query, you can call $rand in a command-level let variable. Description of Linked TicketFor generating a random number during aggregation or something like SERVER-22225 it would be nice to have a way to generate a (pseudo-)random number, either as an expression or an a system variable. Scope of changesImpact to Other DocsMVP (Work and Date)Resources (Scope or Design Docs, Invision, etc.) |
| Comments |
| Comment by Githook User [ 14/Jan/21 ] |
|
Author: {'name': 'Dave Cuthbert', 'email': 'dave.cuthbert@mongodb.com', 'username': 'davemungo'}Message: |
| Comment by Githook User [ 12/Jan/21 ] |
|
Author: {'name': 'Dave Cuthbert', 'email': 'dave.cuthbert@mongodb.com', 'username': 'davemungo'}Message: |
| Comment by Githook User [ 11/Jan/21 ] |
|
Author: {'name': 'Dave Cuthbert', 'email': 'dave.cuthbert@mongodb.com', 'username': 'davemungo'}Message: |
| Comment by Githook User [ 11/Jan/21 ] |
|
Author: {'name': 'Dave Cuthbert', 'email': 'dave.cuthbert@mongodb.com', 'username': 'davemungo'}Message: |