How can I create a search function with different categories?