Dears,
i was like to create a dynamic view in couchdb, and i'd like to ask how to get access to parameter key in couch view. like follow :
function(doc) {
if ((doc['couchrest-type'] == 'User') && ((doc['email'] != null) || (doc['login'] != null ))) {
if (doc['email'] == parameter[key]) {
emit(doc['email'], doc);
} else if (doc['login'] == parameter[key]) {
emit(doc['login'], doc);
}
}
}
and what is the disadvantages for dynamic views in couchdb. and how to add such dynamic views in Couchrest Model.
Thanks, Shenouda Bertel