add function for update mongodb with pdf texts