You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2009/01/22 05:07:49 UTC
[Couchdb Wiki] Update of "View Snippets" by GlennRempe
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.
The following page has been changed by GlennRempe:
http://wiki.apache.org/couchdb/View_Snippets
The comment on the change is:
Spelling
------------------------------------------------------------------------------
== Count documents with and without an attachment ==
- Call this with ''group=true'' or you only get the combined number of documents witch and without attachments.
+ Call this with ''group=true'' or you only get the combined number of documents with and without attachments.
{{{
map: function(doc) {
if (doc._attachments) {
- emit("with attatchment", 1);
+ emit("with attachment", 1);
}
else {
- emit("without attatchment", 1);
+ emit("without attachment", 1);
}
}
reduce: function(keys, values) {