[DOCS-13321] Investigate changes in SERVER-42423: Use ProjectionExecutor in ProjectionStageDefault Created: 02/Jan/20  Updated: 13/Nov/23  Due: 05/Jun/20  Resolved: 16/Jun/20

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: 4.3.1, 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: 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-42423 Use ProjectionExecutor in ProjectionS... Closed
Related
Participants:
Days since reply: 3 years, 34 weeks, 1 day ago
Epic Link: DOCS: 4.4 Server Release Work

 Description   

Description

Downstream Change Summary

The following changes to the projection language were made under this ticket:

1) In 4.2 the following projection:
{a: “foo”}
means "include a".

In 4.4 this means return a set to the string "foo".

Numbers (double/int/long/decimal) and booleans are still treated as markers for inclusion/exclusion.

2) Field ordering of find() projections using $elemMatch may not be the same between 4.2 and 4.4. See here in design doc:
https://docs.google.com/document/d/1K3KuAeYg5KuD1dKw4UvPLBite43_qv4wAd79rMwiJEQ/edit#bookmark=id.4iidgo563q21

3) $slice (in find()) no longer includes the entire root of a projected subfield
e.g. in 4.2, this query would include all of 'a':
[code]
db.c.find({}, {x: 1, "a.c": {$slice: 1}})
[code]

In 4.4, only 'a.c' will be included. This was arguably a bug.

4) Applying the positional projection to a path which had no arrays now behaves like an inclusion projection, rather than creating an empty document. See here in design document (and links to more detailed explanations):
https://docs.google.com/document/d/1K3KuAeYg5KuD1dKw4UvPLBite43_qv4wAd79rMwiJEQ/edit#bookmark=kix.kwu7hv9rfjc6

This will only affect queries that use positional projection ($) on non-array fields.

Description of Linked Ticket

Plug in the new execution code to the find() command. This should remove most uses of ProjectionExec from the query system.

Scope of changes

Impact to Other Docs

MVP (Work and Date)

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



 Comments   
Comment by Githook User [ 16/Jun/20 ]

Author:

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

Message: DOCS-13321: 4.4 project compatibility changes
Branch: master
https://github.com/mongodb/docs/commit/a11bca38df2c03bd2714f1304f3e54527f3156a0

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