Ah, just in case this is something triggered because of the specific dmedia view functions, here's the code:
map = """ function(doc) { if (doc.type == 'dmedia/file' && typeof(doc.bytes) == 'number') { emit(doc.bytes, doc.bytes); } } """
reduce = '_sum'
Ah, just in case this is something triggered because of the specific dmedia view functions, here's the code:
map = """
emit(doc. bytes, doc.bytes);
function(doc) {
if (doc.type == 'dmedia/file' && typeof(doc.bytes) == 'number') {
}
}
"""
reduce = '_sum'