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: provide options for sorting search results by number of imports and stars on GitHub #36952

Open
thejerf opened this issue Jan 31, 2020 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite/search Issues related to pkg.go.dev search functionality pkgsite

Comments

@thejerf
Copy link

thejerf commented Jan 31, 2020

As requested on https://blog.golang.org/pkg.go.dev-2020: I have found godoc.org to be the best way to search for quality Go modules, significantly because it defaults to sorting by the number of imports (possibly informed by the number of stars).

Compare: https://pkg.go.dev/search?q=smtp

To: https://godoc.org/?q=smtp

Observe, for instance, that on godoc.org, Brad Fitz's smtpd server comes up early, whereas on pkg.go.dev the front page has several packages of much less importance, and smtpd shows up on page 17 after a lot of inner modules and minor forks and larger projects that just happen to have an "smtp" package. Prioritizing hits at the "top level" of the package is probably a good idea, too; github.com/blah/smtpd is much more likely to be what I'm looking for than github.com/blah/project/go/inner1/inner2/smtp.

I also routinely suggest this to newcomers as a way of locating modules for Go.

@ALTree ALTree added pkgsite NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels Feb 1, 2020
@julieqiu
Copy link
Member

julieqiu commented Feb 3, 2020

Thanks for the feedback! We sort by package imports currently, and are working to improve our search quality. If you have other examples of bad searches, feel free to post them on this issue.

@julieqiu julieqiu added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels Feb 3, 2020
@gopherbot gopherbot added this to the Unreleased milestone Feb 6, 2020
@mewmew
Copy link
Contributor

mewmew commented Feb 25, 2020

As suggested by @ALTree, I'm moving #37430 here as the two issues are quite related. The main difference is that -- rather than just changing the default sort order -- #37430 requests the feature to allow users to select search order, including ascending and descending.

Provide options for sorting search results by number of imports and stars on GitHub

From #37430 (comment):

This issue is a feature request for pkg.go.dev to provide options for sorting search results based on number of imports, number of stars (on GitHub), date of release, etc. Preferably, the user could also specify whether to have the search results presented in ascending or descending search order.

For an example of this functionality, see the GitHub search results:

The search option categories of pkg.go.dev would include sorting by:

Note, GitHub stars was a useful metric detailed by godoc.org, which currently seem to be absent from search results of pkg.go.dev.

screenshot_2020-02-25_00:10:03

@julieqiu julieqiu changed the title go.dev: Default to sorting by imports/stars go.dev: provide options for sorting search results by number of imports and stars on GitHub Mar 11, 2020
@julieqiu julieqiu changed the title go.dev: provide options for sorting search results by number of imports and stars on GitHub x/pkgsite: provide options for sorting search results by number of imports and stars on GitHub Jun 15, 2020
@julieqiu julieqiu modified the milestones: Unreleased, pkgsite/search Aug 19, 2020
@hyangah hyangah added the pkgsite/search Issues related to pkg.go.dev search functionality label May 20, 2022
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/search Issues related to pkg.go.dev search functionality pkgsite
Projects
None yet
Development

No branches or pull requests

6 participants