[DOCS-14480] Investigate changes in SERVER-55475: instock:{$slice:1} doesn't trigger the "inclusion" Created: 20/May/21  Updated: 30/Oct/23

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: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-55475 instock:{$slice:1} doesn't trigger th... Closed
Participants:
Days since reply: 1 year, 14 weeks, 2 days ago
Epic Link: DOCSP-15943

 Description   

Description

Downstream Change Summary

The semantics of $slice is updated to be consistent with other projection operators. Now specifying $slice in projection for a field will trigger an implicit inclusion.

Description of Linked Ticket

https://docs.mongodb.com/manual/tutorial/project-fields-from-query-results/

 

db.inventory.find({"item":"postcard"}, {_id:0, instock:{$slice:1}})

returned

{ "item" : "postcard", "status" : "A", "size" : { "h" : 10, "w" : 15.25, "uom" : "cm" }, "instock" : [ { "warehouse" : "B", "qty" : 15 } ] }

it was expected to return

{"instock" : [ { "warehouse" : "B", "qty" : 15 } ] }

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:10:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.