On Mar 29, 2013, at 10:56 AM, Troy Martin <[email protected]> wrote:

> I'm wondering if I can use view collation to fetch the user and their 
> associated groups in one request to increase efficiency?

Sure; this is a pretty textbook example. Just write a map function that looks 
for group documents and emits keys that are pairs of the form [userid, 
groupid]. Then to find a user’s groups, query this view with a key range of 
startkey=[userid] and endkey=[userid, {}].

—Jens

Reply via email to