java - Map Reduce Couch Db -
i have simple database couch db. have users have fields:
string username string password string mail boolean admin
i keep users @ db. new couch db , nosql. how can implement map reduce on example (or internally , don't need anything?)
i use spring 3 , ekorp application.
in couch, add field in documents called
_type
or
type_
the map function be
function(doc) { if(doc.type_=="user") { emit(doc.name,doc._id); } }
Comments
Post a Comment