[SERVER-26153] Order $graphLookup results by ascending depth from the source node Created: 17/Sep/16 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Konstantin Zamaraev | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | graph | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Assigned Teams: |
Query Execution
|
||||
| Participants: | |||||
| Description |
|
Results array of the $graphLookup should be in order from the first node to the last(from closest nodes) . Currently, it's in reversed order. Also, Output example in implementation ticket |
| Comments |
| Comment by Charlie Swanson [ 18/Sep/16 ] |
|
Thanks for the request. I've marked this to be looked at by the query team for consideration and/or scheduling. Please note in the meantime that there are no guarantees on the order of results in the output array from $graphLookup. The visited documents are put into a set, so will be output in no particular order. If you need an order, consider specifying the 'depthField' argument, and sorting by that. |