Guest User

Untitled

a guest
May 26th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. collection = @mongo_db.collection("identities")
  2.  
  3. collection.mapreduce("function () {
  4. emit(this.d, {'identity' : this.i});
  5. };",
  6. "function(key, vals) {
  7. identities = [];
  8. for (var i=0; i<vals.length; i++) {
  9. identities += vals[i].identity;
  10. };
  11. return {'identity' : identities};
  12. }};",
  13. :out => "associated",
  14. :verbose => true)
Add Comment
Please, Sign In to add comment