How does the search function work?