Skip to content

x/pkgsite: searching for modules isn't supported #36814

@mvdan

Description

@mvdan

The current search functionality works on packages alone. That's fine, and useful - but quite limited in the module world.

For example, when I visit https://pkg.go.dev/search?q=sh, I'd expect to see https://pkg.go.dev/mod/mvdan.cc/sh/v3. Particularly since the query string is an exact match with the basename of the module path.

However, because it happens to not be a Go package, it doesn't show up at all as neither a module nor a package. A few sub-packages show up later, but they are scattered, and aren't nearly as useful.

I see two ways this could be addressed:

  1. Make the search work for both packages and modues, allowing to trim it down with selectors like is:module. Think like GitHub search, where you can search for both issues and PRs at once, but then trim it down via is:issue.
  2. Keep the search as it is now, but also add a "module search" page.

I think 1 is far better, since most people will just use the default search page, leaving out many of their potentially useful results hidden away.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.UXIssues that involve UXD/UXR inputpkgsitepkgsite/searchIssues related to pkg.go.dev search functionality

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions