-
Notifications
You must be signed in to change notification settings - Fork 268
Closed
Labels
Description
Hello.
I managed to code a full library using this library (https://github.com/nilportugues/php-mongodb-repository)... but I haven't managed to do get this running:
db.book_facets.group({
"key": {
"facetName": true,
"facetValue": true
},
"initial": {
"total": 0
},
"reduce": function(obj, prev) {
if (obj.facetValue != null) if (obj.facetValue instanceof Array) prev.total += obj.facetValue.length;
else prev.total++;
}
});
Any clues or better documentation on how to run this?
Thanks