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: searching for modules isn't supported #36814

Closed
mvdan opened this issue Jan 27, 2020 · 3 comments
Closed

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

mvdan opened this issue Jan 27, 2020 · 3 comments
Labels
FeatureRequest FrozenDueToAge 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 UX Issues that involve UXD/UXR input

Comments

@mvdan
Copy link
Member

mvdan commented Jan 27, 2020

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.

@mvdan mvdan added the pkgsite label Jan 27, 2020
@dmitshur
Copy link
Contributor

dmitshur commented Jan 28, 2020

To consider one more related data point, go4.org is an example of a module that does not have a Go package at the root. Searching for "go4.org" finds many packages in that module:

https://pkg.go.dev/search?q=go4.org

Perhaps a part of the problem affecting the case described in the original issue is that "sh" is a short word, and so it's hard to use it to find specific results reliability.

@mvdan
Copy link
Member Author

mvdan commented Jan 28, 2020

I don't think the short word is related here - like you said, it's just an example. It's also an exact match for the basename of a module path, so the search shouldn't be particularly tricky at all.

@julieqiu julieqiu changed the title go.dev: searching for modules isn't supported go.dev: support structured search options Jan 28, 2020
@julieqiu julieqiu added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 28, 2020
@julieqiu julieqiu changed the title go.dev: support structured search options go.dev: support searching by modules Jan 28, 2020
@gopherbot gopherbot added this to the Unreleased milestone Feb 6, 2020
@julieqiu julieqiu changed the title go.dev: support searching by modules x/pkgsite: support searching by modules Jun 15, 2020
@julieqiu julieqiu added the UX Issues that involve UXD/UXR input label Jun 15, 2020
@julieqiu julieqiu modified the milestones: Unreleased, pkgsite/search Aug 19, 2020
@julieqiu julieqiu changed the title x/pkgsite: support searching by modules x/pkgsite: add structured search options Aug 21, 2020
@julieqiu julieqiu removed the website label Sep 22, 2020
@julieqiu julieqiu changed the title x/pkgsite: add structured search options x/pkgsite: searching for modules isn't supported Jul 21, 2021
@julieqiu
Copy link
Member

This will be addressed #47321, so closing this issue.

@hyangah hyangah added the pkgsite/search Issues related to pkg.go.dev search functionality label May 20, 2022
@golang golang locked and limited conversation to collaborators May 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FeatureRequest FrozenDueToAge 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 UX Issues that involve UXD/UXR input
Projects
None yet
Development

No branches or pull requests

5 participants