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 2008/06/16 13:06:45 UTC
[Couchdb Wiki] Update of "HttpViewApi" by JanLehnardt
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
------------------------------------------------------------------------------
== 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 for the first time.
+ 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.
A design document that defines ''all'', ''by_lastname'', and ''total_purchases'' views might look like this: