[COMPASS-5636] Aggregate $project not working after $lookup Created: 26/Mar/22  Updated: 27/Oct/23  Resolved: 29/Mar/22

Status: Closed
Project: Compass
Component/s: Aggregation pipeline
Affects Version/s: 1.30.1
Fix Version/s: No version

Type: Bug Priority: Minor - P4
Reporter: Shadoweb EB Assignee: Unassigned
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2022-03-26 115416.png    
Documentation Changes: Not Needed

 Description   

Problem Statement/Rationale

On an Aggregate, I have a simple $lookup that pulls an array of object, on the next pipeline I use a $project with a syntax that works perfectly fine with $set or $addField, so I'm not sure what's going on.

I also launched the aggregate on the shell to see if it comes from Compass, but it also gives me an empty result.

Steps to Reproduce

It works perfectly fine on other collections, so I'm not sure I can reproduce it.

Expected Results

The same result as I get on $set pipeline

Actual Results

Not the same result as I get on $set pipeline

Additional Notes

I use MongoDB 5.0.6 Enterprise



 Comments   
Comment by Rhys Howell [ 29/Mar/22 ]

Hi shadowbob45@gmail.com - thanks for reporting the issue. From the description, since this is not something Compass dependent (also happens in shell) I'm going to close this ticket as works as designed if that's alright.

This question might be better for general support portal: https://support.mongodb.com/welcome
Or the forums might be a good place to find some help: https://www.mongodb.com/community/forums/
If possible posting a minimal example case, so something with a few sample documents and the pipeline would help. Sometimes I find that in building a minimal reproduction I'll find where in my code things aren't happening as expected, or a bug is found!

Generated at Wed Feb 07 22:40:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.