Being able to search a broad list of items (e.g., "products") and then showing a user options to narrow down their search pretty much depends on knowing what kind of search options apply to what is currently being searched for. For example, it would not make sense to let a user narrow down a search for t-shirts by selecting 1 Terabytes or 2 Terabytes. 1TB and 2TB would be entirely suitable for hard drives, though.
You are correct in realizing that this is really a database problem -- but it will also test your knowledge of how to design forms.
Imagine I do a search in some huge product database for "Xbox." We can search a table full of product names for names that are LIKE '%xbox%' and get a list of product ids. We might, based on the items found, concoct a list of product_types that might include VIDEO_GAME_CONSOLES, VIDEO_GAMES, and VIDEO_GAME_ACCESSORIES. Based on the distinct product_types we encounter, we could build a select that let the user choose one type. Depending on which one they select, we might then filter the search results provide additional options specific to the product_type selected. It's a pretty complex problem and would likely be tackled by thinking hard about data structures which reflect the types of items you plan to search and also the options/parameters/filterable aspects of those items that you might want to consider.