Created
October 30, 2008 00:05
-
-
Save sr/20864 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) { | |
if ( doc.type == "collection" ) { | |
emit([doc._id, 0], doc); | |
} else if ( doc.type == "entry" ) { | |
emit([doc.collection, 1, doc.edited], doc); | |
} | |
} |
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) { | |
if ( doc.type == "collection" ) { | |
emit([doc._id, 0], doc); | |
} else if ( doc.type == "entry" ) { | |
emit([doc.collection, 1], doc); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment