[SERVER-47069] $graphLookup output should provide $$depth expression to get depth in output Created: 24/Mar/20 Updated: 27/Oct/23 Resolved: 24/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Hitesh Baldaniya | Assignee: | Katya Kamenieva |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
Can we get the depth of the evaluation as well along with output documents?
"reportingHierarchy" => should provide output like {depth: 1, documents: [{}, {}]} It will help us to reduce no. of queries in order to find depth of children. |
| Comments |
| Comment by Katya Kamenieva [ 24/Mar/20 ] |
|
hitesh.baldaniya@contentstack.com, what you are describing looks like an existing `depthField` field https://docs.mongodb.com/manual/reference/operator/aggregation/graphLookup/index.html |
| Comment by Carl Champain (Inactive) [ 24/Mar/20 ] |
|
Hi hitesh.baldaniya@contentstack.com, Thank you for the report. Kind regards, |