map = function () {
var date = this.datetime;
var min = date.getMinutes() % 5;
var test = Math.round(min/5);
if(test == 0){
date.setMinutes(date.getMinutes() - min);
}
else {
date.setMinutes(date.getMinutes() - min + 5);
}
date.setSeconds(0);
date.setMilliseconds(0);
emit(this._id, {array_serial: this.array_serial, port_name: this.port_name, min: min, datetime: date, metric: this.metric});
}
reduce = function() {}
You are correct that the structure of the final documents will not be exactly the same as the original doc structure. Please feel free to track or upvote this issue in JIRA.
On Sunday, October 21, 2012 7:44:27 PM UTC-4, Chris Matta wrote: