Skip to content

Instantly share code, notes, and snippets.

@craigw
Created July 20, 2009 19:35
Show Gist options
  • Save craigw/150789 to your computer and use it in GitHub Desktop.
Save craigw/150789 to your computer and use it in GitHub Desktop.
{
"_id": "_design/articles",
"_rev": "28651884",
"language": "javascript",
"views": {
"all": {
"map": "function(doc) { if(doc.type == 'article') { emit(null, doc); } }"
},
"by_author_id": {
"map": "function(doc) { if(doc.type == 'article') { emit([doc.author_id], doc); } }"
},
"by_status": {
"map": "function(doc) { if(doc.type == 'article') { emit([doc.status], doc); } }"
},
"titles": {
"map": "function(doc) { if(doc.type == 'article') { emit(null, { 'id': doc._id, 'title': doc.title }); } }"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment