Use the search thread function.