couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Couchdb Wiki] Update of "View Snippets" by CuriousAttemptBunny
Date Thu, 26 Feb 2009 04:14:38 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 CuriousAttemptBunny:

The comment on the change is:
replaced _slow_view with correct _temp_view

  curl -s -i -X POST -H 'Content-Type: application/json' 
    -d '{"map": "function(doc){if(doc._attachments) {emit(\"with\",1);} else {emit(\"without\",1);}}",

    "reduce": "function(keys, values) {return sum(values);}"}' 
-   'http://localhost:5984/somedb/_slow_view?group=true'
+   'http://localhost:5984/somedb/_temp_view?group=true'
  In SQL this would be something along the lines of {{{SELECT num_attachments FROM table GROUP
BY num_attachments}}} (but this would give extra output for rows containing more than one

View raw message