-
Book Overview & Buying
-
Table Of Contents
Learning Couchbase
By :
We have written views in the form of map and reduce functions. A view creates indexes and stores them on disk for all documents with the output of map function, along with reduce function's output. Couchbase provides a filtering mechanism for documents generated by views. We can also perform some transformation on data using; the group level, which is discussed subsequently.
We can specify key values to filter documents while querying views, like this:
key="2008"
We can also specify a key explicitly to get only that particular key's details. Here, we will get only the view record that pertains to the 2008 key, as follows:
The following screenshot shows the interface to key in the, key to filter indexes:

Key interface
When you execute the view with the preceding key filter, you will only see records that pertain to the particular key, as shown here:

View result
keys=["2007","2008"]
We can explicitly specify a list of keys to get only those particular keys...
Change the font size
Change margin width
Change background colour