viewer/multies.js
// For any top level number field add them together
For any top level number field add them together
For any top level number field add them together
function simpleGatherAdd (req, res) {
  simpleGather(req, res, null, (err, results) => {
    const obj = results[0];
    for (let i = 1; i < results.length; i++) {
      shallowAdd(obj, results[i]);
    }
    obj.cluster_name = 'COMBINED';
    res.send(obj);
  });
}
function simpleGatherAdd ( req , res ) { simpleGather ( req , res , null , ( err , results ) => { const obj = results [ 0 ] ; for ( let i = 1 ; i < results . length ; i ++ ) { shallowAdd ( obj , results [ i ] ) ; } obj . cluster_name = 'COMBINED' ; res . send ( obj ) ; } ) ; }
For any top level number field add them together
For any top level number field add them together