mongodb - Mongo Db aggregation $redact error on shell -


i make aggregate in mongo db. have error

$redact's expression should not return aside variables &&keep, $$descend , $$prune, returned {if:true}

sounds $redact not have $cond statment within it's arguments:

db.collection.aggregate([     { "$redact": {         "$cond": {             "if": <logical condition>             "then": < $$keep or $$prune or $$descend >,             "else": < $$keep or $$prune (etc) depending on false >         }     }} ]) 

it's covered in manual page linked.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -