> Problem is I need an additional filter in there and I'm not sure how to get > it in - and it's far from ideal to hardcode the language. Can I have more > than one key in the emit function? Any examples of this kind of thing > anywhere? >
http://www.cmlenz.net/archives/2007/10/couchdb-joins That should get you started. > > I mean, what I really want to do is > > "function(doc) { if (doc.type == 'content_node' ) emit((doc.title_slug, > doc.language, doc.user_id), doc); }" > > but somehow I don't think it works like that. I know, that'd be amazing if it did though, right? Turns out it does, and it's a huge help in search and sort operations (though it's still taking me some time to adjust to all the possibilities). From your example, just change the inside set of () in the emit to [] and you're in business.
