> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
On Sat, Feb 11, 2012 at 7:38 AM, songhe yang <songh...@gmail.com> wrote:
db.runCommand({
"aggregate" : "people",
"pipeline" : [
{
"$group" : {
"_id" : "$name"
}
}]})
This creates a unique list of the name field.
Not sure distinct makes sense as a pipeline operator. Feel free to add
a request: http://jira.mongodb.org/