[DOCS-16163] [SERVER] [Feedback] misleading usage of alias Created: 25/May/23  Updated: 13/Nov/23  Resolved: 21/Jul/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 4.4.0, 5.0.0, 6.0.0, 6.3, 7.0.0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Bug Priority: Major - P3
Reporter: Michael Höller Assignee: Dave Cuthbert (Inactive)
Resolution: Gone away Votes: 0
Labels: quick-win, server-docs-bug-bash
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 36 weeks, 6 days ago

 Description   

Quote from this doc page

> The $replaceWith  is an alias for $replaceRoot.

This is actually not true, since the syntax for $replaceRoot is:

{ $replaceRoot: { newRoot: <replacementDocument> } }

whereas the syntax for $replaceWith is :

{ $replaceWith: <replacementDocument> }

I understand why it is named "alias", just I had already some developers taking this literally and failing since they did not add the newRoot part... I like to suggest to point out that this is an alias in terms of the functionality but not in terms of syntax.


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