Updated docAsUpsert in update to use fields mapper