translate this mysql into a couchdb view?
问题 I'm quite new with couchdb and I want to create a view based on a simple mysql statement. I found this documentation: http://guide.couchdb.org/draft/cookbook.html but there are sadly not all use cases included. My MySQL-Statement: SELECT `title`, `id`, `author`, `date`, `text` FROM `news` WHERE `date`<=NOW() AND `author`='22' ORDER BY `date` DESC LIMIT 20,10; Thank you very much! 回答1: You need to write a view with the following map function. function(doc) { emit([doc.author, doc.date], {