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 "HttpViewApi" by JanLehnardt
Date Thu, 11 Sep 2008 11:04:12 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 JanLehnardt:
http://wiki.apache.org/couchdb/HttpViewApi

The comment on the change is:
add note about design documents being regular documents

------------------------------------------------------------------------------
  
  == Creating Views ==
  
- To create a permanent view, the functions must first be saved into special ''design documents''.
The IDs of design documents must begin with ''_design/'' and have a special views attribute
that have a ''map'' member and an optional ''reduce'' member to hold the view functions. All
the views in one design document are indexed whenever any of them gets queried.
+ To create a permanent view, the functions must first be saved into special ''design documents''
(well, they are not really special, we just call them special but in reality, they are regular
documents, just with a special ID). The IDs of design documents must begin with ''_design/''
and have a special views attribute that have a ''map'' member and an optional ''reduce'' member
to hold the view functions. All the views in one design document are indexed whenever any
of them gets queried.
  
  A design document that defines ''all'', ''by_lastname'', and ''total_purchases'' views might
look like this:
  

Mime
View raw message