Table of Contents
Views within Couchbase Server process the information stored in your Couchbase Server database, allowing you to index and query your data. A view creates an index on the stored information according to the format and structure defined within the view. The view consists of specific fields and information extracted from the objects stored in Couchbase. Views create indexes on your information allowing you to search and select information stored within Couchbase Server.
Views are eventually consistent compared to the underlying stored documents. Documents are included in views when the document data is persisted to disk, and documents with expiry times are removed from indexes only when the expiration pager operates to remove the document from the database. Fore more information, read Section 9.2, “View Operation”.
Views can be used within Couchbase Server for a number of reasons, including:
Indexing and querying data from your stored objects
Producing lists of data on specific object types
Producing tables and lists of information based on your stored data
Extracting or filtering information from the database
Calculating, summarizing or reducing the information on a collection of stored data
You can create multiple views and therefore multiple indexes and routes into the information stored in your database. By exposing specific fields from the stored information, views enable you to create and query the information stored within your Couchbase Server, perform queries and selection on the information, and paginate through the view output. The View Builder provides an interface for creating your views within the Couchbase Server Web Console. Views can be accessed using a suitable client library to retrieve matching records from the Couchbase Server database.
For background information on the creation of views and how they relate to the contents of your Couchbase Server database, see Section 9.1, “View Basics”.
For more information on how views work with stored information, see Section 9.3, “Views and Stored Data”.
For information on the rules and implementation of views, see Section 9.2, “View Operation”.
Two types of views, development and production, are used to help optimize performance and view development. See Section 9.4, “Development and Production Views”.
Writing views, including the language and options available are covered in Section 9.4, “Development and Production Views”.
For a detailed background and technical information on troubleshooting views, see Appendix D, Troubleshooting Views (Technical Background).
The Couchbase Server Web Console includes an editor for writing and developing new views. See Section 6.5, “Using the Views Editor”. You can also use a REST API to create, update and delete design documents. See Section 9.7, “Design Document REST API”.