0 听起来您$redact没有$cond statment内它的参数: db.collection.aggregate([ { "$redact": { "$cond": { "if": <logical condition> "then": < something like $$KEEP or $$PRUNE or $$DESCEND >, "else": < something like $$KEEP or $$PRUNE (etc) depending on which is false > } }} ]) 这一切都覆盖在手册中页面链接。 来源 2015-07-13 12:48:24