[DOCS-607] Syntax error in aggregation example? Created: 14/Oct/12  Updated: 29/Nov/12  Resolved: 15/Oct/12

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 11 years, 18 weeks, 2 days ago

 Description   

http://docs.mongodb.org/manual/reference/command/aggregate/

If I try using this as is:

{ $group : {
     _id : { tags : 1 },
     authors : { $addToSet : "$author" }
  }

it'll give me

exception: field inclusion is not allowed inside of $expressions

Changing _id to _id: '$tags' gives the expected result.



 Comments   
Comment by auto [ 15/Oct/12 ]

Author:

{u'date': u'2012-10-15T08:01:47-07:00', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-607 fixing syntax error in aggregation document
Branch: master
https://github.com/mongodb/docs/commit/22ea76dda69eb2cac795aefe7561fe255fe2f434

Generated at Thu Feb 08 07:39:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.