Optionally restrict searches to package or function results
Suggestion from @marick. I'm imagining 3 radio buttons just above the list of search results:
- Show packages and functions (default)
- Show packages only
- Show functions only
This, together with #147, should make it much easier to find packages for a particular task if you aren't already familiar with the ecosystem.
What about three sections with links at the top to the top of each section?
I think that might pose an issue if we have an upper bound on the number of results (which, if I remember correctly, we do)?
Well we could impose a limit in each category separately.
Ok, true. I think both would work, yeah. I guess it would be better to separate function and package results.
Actually on second thoughts I think my original suggestion is best, as I think it makes the most sense to interleave different types of results by default according to relevance. Having separate sections could mean that the first few results you see are only very tenuously related to the query — imagine a case where the section which is displayed first has lots of low-relevance results, and the section displayed after that has lots of high-relevance results.