The metadata object makes it very easy to create and update different views on your data using information outside of the main document data. For example, you can use the expiration field within a view to get the list of recently active sessions in a system.
Using the following map() function, which
uses the expiration as part of the emitted data.
function(doc, meta) { if (doc.type && doc.type == "session") { emit(meta.expiration, doc.nickname) } }
If you have sessions which are saved with a TTL, this will allow you to give a view of who was recently active on the service.