Created
August 31, 2009 20:39
-
-
Save arunthampi/178696 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function(doc) { | |
// This view gets all threads and its associated replies | |
if(doc.type == 'thread') { | |
emit([doc._id, doc.time_created], doc); | |
} else if(doc.type == 'reply') { | |
emit([doc.thread_id, doc.time_created], doc); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment