0
我知道這可能很簡單,只是幫助我使用reduce函數來計算使用文檔的長度。如何在mongodb查詢中計算基於文檔長度
我有很大的數據集,我想要計算鍵值對的數量爲44的記錄數以及那些低於它的記錄數。
示例。把我收集的
Obj1 - {44 fields} Type Object
Obj2 - {44 fields} Type Object
Obj3 - {44 fields} Type Object
Obj4 - {44 fields} Type Object
Obj5 - {2 fields} Type Object
Obj6 - {1 fields} Type Object
Obj7 - {44 fields} Type Object
我想要得到的計數5 44和2 <的44
可能的複製在MongoDB中大小大於1(1)](http://stackoverflow.com/questions/7811163/how-to-query-for-documents-where-array-size-is-greater-than-one-1-在-的MongoDB) – Shrabanee