Extended getDocumentPage function with search term parameter