A newer version of this documentation is available.

View Latest

MapReduce Views Using the PHP SDK with Couchbase Server

You can use MapReduce views to create queryable indexes in Couchbase Data Platform.

The normal CRUD methods allow you to look up a document by its ID. A MapReduce (view query) allows you to lookup one or more documents based on various criteria. MapReduce views are comprised of a map function that is executed once per document (this is done incrementally, so this is not run each time you query the view) and an optional reduce function that performs aggregation on the results of the map function. The map and reduce functions are stored on the server and written in JavaScript.

MapReduce queries can be further customized during query time to allow only a subset (or range) of the data to be returned.

See the Incremental MapReduce Views and Querying Data with Views sections of the general documentation to learn more about views and their architecture.

You can find further information in the API docs.