[SERVER-20595] Unwind with includeArrayIndex produces different structure results for arrays and non-arrays Created: 23/Sep/15 Updated: 28/Oct/15 Resolved: 07/Oct/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 3.1.8 |
| Fix Version/s: | 3.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Charlie Swanson |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Sprint: | QuInt A (10/12/15) | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
If I now want to do something with "a" value, I have to use an extra project with $ifNull "a.value" in order to find the value of "a" which is in "a". We should allow the user to specify which field the array index should go into. This will override any existing fields, and if the value was not produced from an element in an array (i.e. there is no sensical index to use), we should use the value null instead:
|
| Comments |
| Comment by Githook User [ 13/Oct/15 ] |
|
Author: {u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'charlie.swanson@mongodb.com'}Message: |
| Comment by Githook User [ 07/Oct/15 ] |
|
Author: {u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'charlie.swanson@mongodb.com'}Message: |
| Comment by Githook User [ 07/Oct/15 ] |
|
Author: {u'username': u'cswanson310', u'name': u'Charlie Swanson', u'email': u'charlie.swanson@mongodb.com'}Message: |
| Comment by Charlie Swanson [ 01/Oct/15 ] |
|
After some discussion, we have decided that allowing the user to specify a path to put the index into is a little better than always putting the index into a sub-document. The description has been updated accordingly. |