[SERVER-11443] $redact can't accept $$DESCEND Created: 29/Oct/13  Updated: 11/Jul/16  Resolved: 19/Dec/13

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: 2.5.3
Fix Version/s: 2.5.5

Type: Bug Priority: Major - P3
Reporter: Ranjay Krishna Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: aggregation
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Steps To Reproduce:

db.aggregate( [

{ $redact: "$$DESCEND" }

] );

Participants:

 Description   

In the case where the user wishes to iterate over all the documents and descend down all the subdocuments, $redact fails.

Consider the following syntax:

$redact: { $cond: [true, $$DESCEND, $$DESCEND] }

this will get serialized to:

$redact: $$DESCEND.

However, this fails with the error:

"exception: $redact specification must be an object".



 Comments   
Comment by Githook User [ 19/Dec/13 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-11443 Support all expressions in $redact, not just objects
Branch: master
https://github.com/mongodb/mongo/commit/4b214cdb0174400cd40a59bd39bfa5bb490e6f6f

Generated at Thu Feb 08 03:25:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.