Details
-
Bug
-
Resolution: Done
-
Critical - P2
-
None
-
3.2.1
-
None
-
ALL
Description
I have the following code (in ruby using mongoid)
map = %Q{
|
function() {
|
emit(1000, {count: this.am});
|
}
|
}
|
|
|
reduce = %Q{
|
function(key, values) {
|
|
|
var count = 0;
|
values.forEach(function(value) {
|
count++;
|
});
|
|
|
return { count: count};
|
}
|
}
|
Problem is, that count == 2. while I have a couple of hundreds of documents