Extract search query from search field