resource map function for bulk doc updates