byEmail: {
        map: function (doc) {
          if (doc.isUser && doc.email) {
            emit(doc.email, doc);
          }