-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Query Optimization
Currently $redact always says that it doesn't know which fields it needs. This is true if there are any uses of $$DESCEND in the expression since all fields are relative to $$CURRENT which is rebound in each subobject. However, if the $redact expression only uses $$KEEP and $$PRUNE (ie only whole-object redaction) we never rebind $$CURRENT and it is always $$ROOT. In that case we are able to know all of our dependencies which can result in much more efficient execution.