couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "View Snippets" by GlennRempe
Date Thu, 22 Jan 2009 04:07:49 GMT
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) {

Mime
View raw message