[DOCS-13493] Investigate changes in SERVER-45453: Change name and usage of $_internalJs to $function Created: 04/Mar/20  Updated: 30/Oct/23  Due: 27/Mar/20  Resolved: 27/Mar/20

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

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: docs-query
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-42644 M/R Agg: Add $_internalJs expression Closed
documents SERVER-45453 Change name and usage of $_internalJs... Closed
Duplicate
Related
related to DOCS-13387 Investigate changes in SERVER-45456: ... Closed
Participants:
Days since reply: 1 year, 39 weeks, 1 day ago
Epic Link: DOCS: 4.4 Server Release Work

 Description   

Description

Downstream Change Summary

Adds a new $function expression which can execute javascript code.

Description of Linked Ticket

Rename $_internalJs to $function, and change how it parses its arguments.
$function takes the following required fields:

  • body - a function given as a constant expression of the String or Code BSON type
  • args - function’s arguments given by an expression evaluating to the Array BSON type.
  • lang - a language specifier given as a constant expression of the String type; the only acceptable value for now is 'js'

Update MapReduce where necessary to generate $function expressions instead of $_internalJs.

Because this is a new operator, we should restrict its use to FCV 4.4 to prevent problems with downgrade (for example, to prevent users from creating views that would be invalid on 4.2). But we should also make sure MapReduce still works on FCV 4.2, even though it uses this new operator internally.

Scope of changes

Impact to Other Docs

MVP (Work and Date)

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



 Comments   
Comment by Education Bot [ 10/May/22 ]

Fix Version updated for upstream SERVER-45453:

Comment by Githook User [ 27/Mar/20 ]

Author:

{'name': 'Kay Kim', 'username': 'kay-kim', 'email': 'kay.kim@10gen.com'}

Message: DOCS-13493: 4.4 $function
Branch: master
https://github.com/mongodb/docs/commit/7f93fadbd07f3c5ba391289a38c1316cbdc8b016

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