[DOCS-11558] Comment on: "manual/reference/operator/aggregation/project" Created: 09/Apr/18  Updated: 27/Oct/23  Resolved: 16/Apr/18

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

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Stennie Steneker (Inactive)
Resolution: Works as Designed Votes: 0
Labels: collector-298ba4e7, mts
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

3.6 maybe, idk, and i dont have time for this actually

Location: https://docs.mongodb.com/manual/reference/operator/aggregation/project/
Referrer: https://www.google.hu/
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Screen Resolution: 1366 x 768


Participants:
Days since reply: 5 years, 43 weeks, 3 days ago

 Description   

I really need to combine somehow the $project aggregation with the $lookup collection.
Basically I'm returning every projects from the database, and I'm using the $project aggregator there to limit the field numbers. And i'm using a $lookup to assign the media files to these project, then filter the media fields, but I just can't find the information how can i do this. Nothing on google, stackoverflow - also no response - simply just nothing. Am I missing the logic or something? Actually joining the medias with the projects are pretty easy, but filtering out the not neccessary fields is seems impossible to me in mongoDB.



 Comments   
Comment by Stennie Steneker (Inactive) [ 16/Apr/18 ]

MongoDB 3.6 added support for executing a pipeline via $lookup which enables more advanced filtering and projection use cases. For example, a $lookup pipeline can include a $project stage to limit the fields returned.

Note that the DOCS project is for reporting documentation errata or suggestions. For appropriate channels for MongoDB-related support discussion please refer to Technical Support options in the MongoDB documentation.

Regards,
Stennie

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