I am using spring data to fetch couchbase documents. I assume the document expiry cannot be set as a configurable value externalized in a property file (@Document(expiry = )) based on answer in this link
However can I define a view in cochbase and have query to return only the documents which have been created in the past 15 minutes? I don't want to save additional information regarding date in my document and I am looking to see if there is any meta data that can be used for this purpose
function (doc, meta) {
if(doc._class=="com.customer.types.CustomerInfo" ){
emit(meta.id, doc);
}
}