I have a views problem that I dunno if can be solved by couch
here is my map function:
function(doc) {
if ((doc['couchrest-type'] == 'DataValue') &&
doc['device_variable_id']) {
date = new Date(doc.date_time);
emit([doc.device_variable_id, date.getFullYear(),
date.getUTCMonth() + 1, date.getUTCDate(), date.getUTCHours(),
parseInt(date.getUTCMinutes() / 20) ], doc.value);
}
}
Please just min the last key portion emited ->
parseInt(date.getUTCMinutes() / 20)
I use this to sum in groups of values of data for every 20 minutes
I DONT want to make another view if say for example I want to emit for
5 minutes
Views already take too much space!!!
Is there a view I can make that handle conditional key emiting or
something that I can pass a parameter to?
PAco