Created
March 20, 2009 11:14
-
-
Save anandology/82322 to your computer and use it in GitHub Desktop.
couchdb view for /type/edition
This file contains 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
{ | |
"_rev": "1-262566171", | |
"_id": "_design/type_edition", | |
"language": "javascript", | |
"views": { | |
"by_title": { | |
"map": "function(doc) { if (doc.type.key == '/type/edition' && doc.title) emit(doc.title, doc.key);}" | |
}, | |
"by_isbn_10": { | |
"map": "function(doc) { if (doc.type.key == '/type/edition' && doc.isbn_10) for (var i in doc.isbn_10) emit(doc.isbn_10[i], doc.key);}" | |
}, | |
"by_authors": { | |
"map": "function(doc) { if (doc.type.key == '/type/edition' && doc.authors) for (var i in doc.authors) emit(doc.authors[i].key, doc.key);}" | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment