I'm not sure how, but I'd like to continue on when this.tag_list is null
var mapFunc3 = function(){
var tags = this.tag_list.split(',');
for (i in tags) {
emit(tags[i], 1);
}
}
var reducFunc3 = function(key, values){
var count = 0;
for( i in values){
count += values[i];
}
return count;
}
db.names.mapReduce(
mapFunc3,
reducFunc3,
{out: "mr_3"}
)
The error I get is:
"errmsg" : "MapReduce internal error :: caused by :: TypeError: this.tag_list is null :\n@:2:5\n",
"code" : 139,
"codeName" : "JSInterpreterFailure"
}
mapFunc3asarrow functionand try.