During view processing, metadata about individual documents is
exposed through a separate JSON object, meta,
that can be optionally defined as the second argument to the
map(). This metadata can be used to further
identify and qualify the document being processed.
The meta structure contains the following
fields and associated information:
id
The ID or key of the stored data object. This is the same as the key used when writing the object to the Couchbase database.
rev
An internal revision ID used internally to track the current revision of the information. The information contained within this field is not consistent or trackable and should not be used in client applications.
type
The type of the data that has been stored. A valid JSON
document will have the type json.
Documents identified as binary data will have the type
base64.
flags
The numerical value of the flags set when the data was stored. The availability and value of the flags is dependent on the client library you are using to store your data. Internally the flags are stored as a 32-bit integer.
expiration
The expiration value for the stored object. The stored expiration time is always sotred as an absolute Unix epoch time value.
These additional fields are only exposed when processing the documents within the view server. These fields are not returned when you access the object through the Memcached/Couchbase protocol as part of the document.