Adds funciton to create and insert fulldocs into db