[DOCS-10932] Need example of $lookup in sharded environment Created: 21/Oct/17  Updated: 30/Oct/23  Resolved: 26/Oct/17

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Minor - P4
Reporter: Docs Collector User (Inactive) Assignee: Unassigned
Resolution: Works as Designed Votes: 0
Labels: aggregation-framework, collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu

Location: https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/#
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/61.0.3163.100 Chrome/61.0.3163.100 Safari/537.36
Screen Resolution: 1440 x 900


Participants:
Days since reply: 6 years, 15 weeks, 6 days ago
Story Points: 0.3

 Description   

Can we perform $lookup in a sharded environment. If yes, can you provide a example of using $lookup in a sharded environment.
The error that it shows
"Collection cannot be sharded"



 Comments   
Comment by Stennie Steneker (Inactive) [ 26/Oct/17 ]

As per the $lookup documentation, the from collection must be unsharded so this error is expected:

Performs a left outer join to an unsharded collection in the same database to filter in documents from the “joined” collection for processing.

Regards,
Stennie

Generated at Thu Feb 08 08:01:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.