Details
-
Improvement
-
Resolution: Fixed
-
Minor - P4
-
No Release
-
None
Description
The `mongo.Pipeline{}` example in this link, https://godoc.org/github.com/mongodb/mongo-go-driver/mongo#Pipeline, is incorrect.
mongo.Pipeline{{
|
{"$group", bson.D{{"_id", "$state"}, {"totalPop", bson.D{"$sum", "$pop"}}}},
|
{"$match": bson.D{{"totalPop", bson.D{"$gte", 10*1000*1000}}}},
|
}}
|
It should be as follows:
mongo.Pipeline{{
|
{{"$group", bson.D{{"_id", "$state"}, {"totalPop", bson.D{{"$sum", "$pop"}}}}}},
|
{{"$match", bson.D{{"totalPop", bson.D{{"$gte", 10 * 1000 * 1000}}}}}},
|
}}
|