Permalink
Browse files

Tag view

  • Loading branch information...
1 parent 9443f9a commit 1436024d5f6f68cf4579aa3f4a4d5c7737ad2a4c @topfunky committed Sep 12, 2008
Showing with 10 additions and 0 deletions.
  1. +7 −0 couchdb_views/notes/by_tag-map.js
  2. +3 −0 couchdb_views/notes/by_tag-reduce.js
@@ -0,0 +1,7 @@
+function(doc) {
+ if (doc.type == "Note" && doc.tags) {
+ doc.tags.map(function(tag) {
+ emit(tag, doc);
+ });
+ }
+}
@@ -0,0 +1,3 @@
+function(key, values) {
+ return {"tag":key[0][0], "count":values.length};
+}

0 comments on commit 1436024

Please sign in to comment.