jsr icon indicating copy to clipboard operation
jsr copied to clipboard

request: Better Module Search

Open retraigo opened this issue 1 year ago • 2 comments

Can we have a better module searching feature on JSR? Something like the search used by image boards, discord, etc.

Example websocket - Normally searches for websocket

runtime:deno websocket - Searches for websocket that runs on Deno.

runtime:deno runtime:node websocket - Searches for websocket that runs on both Deno and Node.

scope:std websocket - Searches for websocket under the std scope.

This would be even more useful if concepts like tags (eg. Markdown, ML, Crypto) were introduced for libraries.

retraigo avatar Mar 21 '24 02:03 retraigo

would also be helpful if you entered an exact scope into the search (eg. @std) for it to take you directly to that scope index (ie. https://jsr.io/@std). At present you get a random selection of @std packages and a bunch of other packages that happen to contain std in the name.

jollytoad avatar Apr 17 '24 14:04 jollytoad

A search for the Deno standard library "@std" show:

jsr-search

The full results page prioritises:

  • A package with zero score and no documentation
  • An unofficial “All-in-one mirror of Deno’s Standard Library.”
  • An empty package with no files and 1 yanked version
  • “PRIVATE: The internal package for @std. Do not use this directly.”
  • Two “DEPRECATED” @std packages

All before the first relevant @std package.

dbushell avatar Aug 06 '24 11:08 dbushell

Given that @std is sort of special, I wouldn't even mind ranking it artificially high even if other results match better.

Also, search should ideally index everything about a package, not just the name/description. For example, I'd imagine that searching for “closest string” brings me directly to https://jsr.io/@std/text/doc/~/closestString but it currently doesn't do that at all (try it).

The search bar is as prominent as on Google so you gotta deliver on great results, too. If it's too hard/out of scope to build a scalable module search that can index the packages fully, then maybe the UI needs to be reconsidered.

KnorpelSenf avatar Oct 14 '24 21:10 KnorpelSenf