Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
2.4.4, 2.5.3
-
None
-
Ubuntu 12.04 (64 bit)
-
Linux
Description
With reference to the attached dataset test9371.json imported into a collection 'zips' (on mongodb 2.4.4 and mongodb 2.5.3),
when we run the following query :
db.zips.aggregate( { $group:
|
{ _id: { state: "$state", city: "$city" },
|
zipcount : {$sum : 1},
|
pop: { $sum: "$pop" } } },
|
{ $sort: { zipcount: 1 } },
|
{ $group:
|
{ _id : "$_id.state",
|
biggestCity: { $last: "$_id.city" },
|
population: { $last: "$pop" },
|
zipcount : { $last : "$zipcount"}
|
} } ,{ $sort : {population : -1}})
|
different results are returned on mongodb 2.4.4 (pls refer to attached results_244.png) and mongodb 2.5.3.(pls refer results_253.png).
Could you please investigate whats causing this discrepancy? Thank you