-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add support for $lookup with let
/pipeline
form to aggregation [DATAMONGO-2467]
#3322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Herman Bovens commented I think this one deserves Major priority instead of Minor. Uncorellated subqueries and multiple join conditions are just two possible uses, but there is more. Not being able to use a pipeline for lookup leads to inefficient queries: instead of doing a $project operation inside the $lookup operation when not all fields of the target document are needed, people fall back to doing the projection after the lookup (or even not at all). Limiting the number of fields has proven to be faster for me, definitely much faster if the index on the target collection that is used contains all of the projected fields |
One of the reason to implement this is the error below, this occurs with large data if lookup is not followed by Unwind, the large array that is formed in normal lookup leads to limit of 16MB, where as Mongo engine restructures lookup operation if its a let/pipeline combination or followed by Unwind operation: 2021-06-24T14:40:51.698+0000 E QUERY [js] Error: command failed: { |
Any update on this issue? |
ye this would be preferede instead of writing custom Bson docs. Any update ? |
Any update on this issue? |
Add guard to skip tests prior to 5.0 server version. Related to: #3322
Add guard to skip tests prior to 5.0 server version. Related to: #3322
Shiv Jha-Mathur opened DATAMONGO-2467 and commented
Perform uncorrelated subqueries between two collections as well as allow other join conditions besides a single equality match:
Reference URL: https://docs.mongodb.com/master/reference/operator/aggregation/lookup/#join-conditions-and-uncorrelated-sub-queries
1 votes, 2 watchers
The text was updated successfully, but these errors were encountered: