Added callbacks in mongoose save to update dependent documents. Added edit inventories.  Fixed search mapping error.