Search:

Search all manuals
Search this manual
Manual
Couchbase Server Manual 2.0
Community Wiki and Resources
Download Couchbase Server 2.0
Couchbase Developer Guide 2.0
Client Libraries
Couchbase Server Forum
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
9 Views and Indexes
Chapter Sections
Chapters

9.8. Querying Views

9.8.1. Querying Using the REST API
9.8.2. Selecting Information
9.8.3. Pagination
9.8.4. Grouping in Queries
9.8.5. Ordering
9.8.6. Understanding Letter Ordering in Views
9.8.7. Error Control

In order to query a view, the view definition must include a suitable map function that uses the emit() function to generate each row of information. The content of the key that is generated by the emit() provides the information on which you can select the data from your view.

The key can be used when querying a view as the selection mechanism, either by using an:

When querying the view results, a number of parameters can be used to select, limit, order and otherwise control the execution of the view and the information that is returned.

When a view is accessed without specifying any parameters, the view will produce results matching the following:

View results and the parameters operate and interact in a specific order. The interaction directly affects how queries are written and data is selected. The sequence and precedence of the different parameters during queries is shown in Figure 9.13, “Views — Querying — Flow and Parameter Interaction”.

Figure 9.13. Views — Querying — Flow and Parameter Interaction

Views — Querying — Flow and Parameter Interaction

The core arguments and selection systems are the same through both the REST API interface, and the client libraries. The setting of these values differes between different client libraries, but the argument names and expected and supported values are the same across all environments.