Details
-
Improvement
-
Resolution: Cannot Reproduce
-
Major - P3
-
None
-
None
-
None
-
None
-
Query Optimization
Description
Aggregate commands like
{aggregate: "foo", pipeline: [{$documents: [...]}], ...} |
fail with "'$documents' can only be run with {aggregate: 1}". However, a $lookup like
{$lookup: {from: "foo", pipeline: [{$documents: [...]}], ...}} |
succeeds. While executing this $lookup, we will never look at the foreign collection, so it's confusing to allow it to be specified here. This ticket is to consider erroring for these $lookups, too.