Does iReport support MapReduce ? (with MongoDB)
I would like to know if I can put a Map Reduce query in this windows, or if not on the report on jasperserver (When You upload you .jrxml you have a "Query" tab)
Thanks
Yes, it does. For example:
{
collectionName : 'dataByZipCode',
sort : {
'value.population' : -1,
},
mapReduce : {
map : 'function () {
emit (this.state, {population : this.pop});
}',
reduce : 'function (key, values) {
var total = 0;
for( var index = 0; index < values.length; index ++) {
total += values[index].population;
}
return {population : total}
}',
out : 'totalPopulation'
}
}