-
Notifications
You must be signed in to change notification settings - Fork 18k
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: package search doesn't find main package with matching name #70459
Comments
Related Issues (Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
Some context: in the v0.0.1 version, the sub-package with the alt implementation was also named If I search for the module in a different way, eg. "multiplexer for io.Readers", it does show the main package. |
Interestingly, a search for "ComaVN/multee" does return the package: Threfore, this does look like a pkgsite bug (not just poor search ranking, which we have various other problems with). |
If this cannot be easily fixed, would it be at least possible to remove/unpublish my package, so I can add it again, without the confusingly named |
Here is why pkgsite shows the subpackage instead of the main one when you search for "multee":
So I think the search algorithm is working as intended. We deliberately don't have any rule that prefers "higher-up" or shorter import paths to longer ones, because there is no reason why the shorter path should be more popular than the longer one. In other words, there is no way for pkgsite to know that what you call the main package is really the important one. The best way to solve your problem is to get users. Presumably a lot more people will use the main package, and this increased popularity will push it to the top of the list. |
(should fix <golang/go#70459>)
FYI @jba I released v0.0.4 where I addressed (some of) your points, but there still seems to be an oddness to the search result: following the link above, https://pkg.go.dev/search?q=multee, still shows the "wrong" package @v0.0.3, but if I then switch to "Symbols" and back to "Packages" the correct package and version is shown. (It changes the url to https://pkg.go.dev/search?limit=25&m=package&q=multee, so it's probably some cache that needs to time out. I tried using a different browser in in-cognito mode as well). I'll check in a few days, and if it doesn't go away, I'll request a package removal, and re-publish it. |
I think it was caching. I just tried the search and I got the v0.0.4 main package. |
Same, thanks for your trouble |
What is the URL of the page with the issue?
https://pkg.go.dev/search?q=multee
What is your user agent?
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Screenshot
What did you do?
I published my package multee.
What did you see happen?
pkg.go.dev doesn't show the main package when searching for "multee", but a sub-package (an alternative implementation that I kept around for benchmarking and testing)
What did you expect to see?
I expect to see the search results show the main package, not a "random" sub package.
The text was updated successfully, but these errors were encountered: