Modifies highlight_search_result to improve the method used.