pursuit icon indicating copy to clipboard operation
pursuit copied to clipboard

Optionally restrict searches to package or function results

Open hdgarrood opened this issue 8 years ago • 5 comments

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.

hdgarrood avatar Mar 12 '17 16:03 hdgarrood

What about three sections with links at the top to the top of each section?

paf31 avatar Mar 12 '17 18:03 paf31

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)?

hdgarrood avatar Mar 12 '17 18:03 hdgarrood

Well we could impose a limit in each category separately.

paf31 avatar Mar 12 '17 19:03 paf31

Ok, true. I think both would work, yeah. I guess it would be better to separate function and package results.

hdgarrood avatar Mar 12 '17 19:03 hdgarrood

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.

hdgarrood avatar Jun 13 '17 12:06 hdgarrood