Add Search Dialog and complete the func of search.