$lookup
is new in MongoDB 3.2. It performs a left outer join to an unsharded collection in the same database to filter in documents from the “joined” collection for processing.
To use $lookup
, the from
collection cannot be sharded.
On the other hand, sharding is a useful horizontal scaling approach.
What's the best practise to use them together?