Algorithm - document(StringBuffer), searchPage setting