views:
  by_supplier_id_and_state:
    map: |
      function(doc) {
        if(doc.ruby_class && doc.ruby_class == 'Order') emit([doc['supplier_id'], doc['state']], 1);
      }
    reduce: _sum
language: "javascript"
