[DOCS-368] Document use of the positional operator and elemMatch to project the matched item in an array Created: 26/Jul/12 Updated: 15/Feb/13 Resolved: 13/Feb/13 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | mongodb-2.2 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Kay Kim (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Days since reply: | 11 years, 5 days ago | ||||||||||||||||||||||||
| Description |
|
Tests are located within "jstests/elemMatchProjection.js". |
| Comments |
| Comment by auto [ 15/Feb/13 ] | ||||||||||||||||||||||||||
|
Author: {u'date': u'2013-02-14T18:06:18Z', u'name': u'kay', u'email': u'kay.kim@10gen.com'}Message: | ||||||||||||||||||||||||||
| Comment by auto [ 15/Feb/13 ] | ||||||||||||||||||||||||||
|
Author: {u'date': u'2013-02-13T20:19:32Z', u'name': u'kay', u'email': u'kay.kim@10gen.com'}Message: | ||||||||||||||||||||||||||
| Comment by auto [ 28/Aug/12 ] | ||||||||||||||||||||||||||
|
Author: {u'date': u'2012-08-28T15:54:10-07:00', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}Message: edits: | ||||||||||||||||||||||||||
| Comment by auto [ 28/Aug/12 ] | ||||||||||||||||||||||||||
|
Author: {u'date': u'2012-08-28T12:55:10-07:00', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}Message: | ||||||||||||||||||||||||||
| Comment by auto [ 28/Aug/12 ] | ||||||||||||||||||||||||||
|
Author: {u'date': u'2012-08-28T11:10:59-07:00', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}Message: | ||||||||||||||||||||||||||
| Comment by Jeffrey Yemin [ 26/Jul/12 ] | ||||||||||||||||||||||||||
|
Making QA ticket dependent on documentation. | ||||||||||||||||||||||||||
| Comment by Jeffrey Yemin [ 26/Jul/12 ] | ||||||||||||||||||||||||||
|
Conversation between me and Ben: ok, was thinking about this a bit more. The behavior is indeed correct, and the results should apear sorted if each document only has one 'b' element. But I think others are likely to run into this thinking they should get sorted results. Or worse, they may not notice this until their app comes across an array containing multiple nested documents with the same field name. So I'm inclined to say this needs to be documented. Apologies again for the absence; been a crazy night. Best, On Wed, Jul 25, 2012 at 8:09 PM, Jeff Yemin <jeff.yemin@10gen.com> wrote: Is this a bug?
I'm thinking no, since the sort is applied before the projection. |