fixed map-reduce

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/private/luca.frosini/GenerateMapReduceCouchbase@157579 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2017-10-25 15:56:59 +00:00
parent 09115443b7
commit 8ee2055930
1 changed files with 2 additions and 1 deletions

View File

@ -10,12 +10,13 @@ function(doc,meta) {
var timestamp = Number(doc.creationTime);
var date = new Date(timestamp);
var dataKey = [];
dataKey.push(doc.operationType);
dataKey.push(date.getUTCFullYear());
dataKey.push(date.getUTCMonth()+1);
dataKey.push(date.getUTCDate());
dataKey.push(date.getUTCHours());
dataKey.push(date.getUTCMinutes());
dataKey.push(doc.operationType);
emit(dataKey, data);
}