Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/pkgsite: support real-time fuzzy searching for packages #44116

Open
myitcv opened this issue Feb 5, 2021 · 2 comments
Open

x/pkgsite: support real-time fuzzy searching for packages #44116

myitcv opened this issue Feb 5, 2021 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

Comments

@myitcv
Copy link
Member

myitcv commented Feb 5, 2021

What is the URL of the page with the issue?

https://pkg.go.dev/

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.40 Safari/537.36

Screenshot

Screen Shot 2021-02-05 at 06 04 32

What did you do?

Typed rogpe in the search box. I'm lazy when it comes to search and I like to do things in a fuzzy way, much like workspace symbol search in gopls.

In this case I was trying to quickly get to https://pkg.go.dev/github.com/rogpeppe/go-internal/testscript

I would like to have been able to type simply rogptes and that result be narrowed down based on a high fuzzy score.

What would you like to see?

Real-time, fuzzy search results presented below the input box, much like Google (GitHub etc)

Screen Shot 2021-02-05 at 06 05 25

What did you see instead?

There is no such feature. It's a request-response based approach at the moment.

@myitcv myitcv added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite labels Feb 5, 2021
@gopherbot gopherbot added this to the Unreleased milestone Feb 5, 2021
@findleyr
Copy link
Contributor

findleyr commented Feb 5, 2021

FWIW, I added a redis-based auto-completion before launch, but it didn't make it to prime-time and I haven't had time to work on it since -- see also #40549. If enough people are interested, perhaps it could be resurrected, in some form or another. Another solution would be to occasionally process the most popular packages, and put them in an in-memory trie on the frontend tasks.

The maintenance cost is definitely non-trivial though, so it would have to be a heavily used feature in order to be worthwhile.

@myitcv
Copy link
Member Author

myitcv commented Feb 5, 2021

Thanks - I suspected this wasn't a novel idea!

The maintenance cost is definitely non-trivial though, so it would have to be a heavily used feature in order to be worthwhile.

Possibly a case where we won't know until we try?! 😄

@jamalc jamalc modified the milestones: Unreleased, pkgsite/unplanned Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Projects
None yet
Development

No branches or pull requests

4 participants