public class myType
{
public int key1;
public int key2;
public int val1;
public int val2;
public int val3;
};
當我向集合中插入myType
對象時,讀取沒有問題。剛:MapReduce輸出C#讀取mongoDB
collection.FindAs<myType>(query);
GET對象:
"key1":key1, "key2":key2, "val1":val1, "val2":val2, "val3":val3
但之後的MapReduce(鍵被構造爲兩個字段的組合)輸出集合有略微改動的結構。類似於
"_id" {"key1" : key1, "key2": key2}, "value" : {"val1":val1, "val2":val2, "val3":val3}
什麼是從輸出集合中讀取對象的方式?
:)這是我昨天做出的完全一樣的解決方案:)但你寫的很好 – Saint