1
Ich habe eine Mongo-Sammlung. Wenn ich renne
> db.coll.count()
6570
>> db.coll.aggregate({ "$group" : { "_id": null, "total": { $sum : 1 } }})
{ "_id" : null, "total" : 6575 }
warum ist das Ergebnis anders?
Mögliche Duplikate von [Mongo: die Rückkehr nicht gleich Anzahl()] (http://StackOverflow.com/Questions/39698862/Mongothe-Reurn-Dont-Equal-Count) – styvane
Siehe auch: [Differenz zwischen Anzahl() und find(). count() in MongoDB] (http://stackoverflow.com/questions/32666330/difference-between-count-and-find-count-in-mongodb) – styvane