Skip to content

x/website: remove search box from golang.org #44357

Closed

Description

@rsc

Related to the topic of redirecting golang.org's documentation pages to pkg.go.dev (#44356), I investigated the use of the search box, to see whether we should keep it around. We should not.

Last Friday I downloaded the most recent 2,500 /search URLs from the golang.org App Engine dashboard and went through them. They spanned 28 hours.

97 were for x/ repo redirects for packages named search, leaving 2,403.
201 were for "Nubo Beauty" or "www.nubobeauty.com" [sic], leaving 2,202.
609 more were URLs that had nothing to do with Go (usually somedomain.cn), leaving 1,592.
Those 1,592 make up 0.0158 QPS over 28 hours, or just under 1 QPM.

There are few enough that you can just read through the list of search terms from that 28-hour period, which I did. Overall it is quite reasonable to turn down search on golang.org in favor of people using Google to find general things or to use pkg.go.dev for packages: there's so little traffic and we answer the queries so badly compared to Google or pkg.go.dev.

It hurts to see people searching for queries like the following, knowing that they got no useful results:

  • 1.16
  • 1.16beta
  • GOPATH
  • k8s.io/api/settings/v1alpha1
  • language and capacity
  • linux installation
  • logical operators
  • mocking struct
  • naming convention
  • remove element from slice
  • sirupsen/logrus
  • string template
  • struct field tag
  • tutorial
  • update go
  • using go modules
  • visual studio code

The saving grace is that hardly anyone is searching at all. But those that are searching would be better served looking for a proper search engine.

Another takeaway for the package discovery site is that once we have the symbols-per-version info, it would be nice to make searches like "x509.Certificate" work. Those come up as well. That's #44142.

Activity

  1. added
    NeedsFixThe path to resolution is known, but the work has not been done.
    on Feb 18, 2021
  2. added this to the Unreleased milestone on Feb 18, 2021
  3. self-assigned this
    on Feb 18, 2021
  4. magical commented on Feb 20, 2021

    @magical
    Contributor

    This seems to have been committed without any discussion: https://go-review.googlesource.com/c/website/+/292590.

    I use the search feature on golang.org to search the Go package documentation and source code. I'm sympathetic to the argument the search box doesn't do what most users expect it to. However, removing it leaves those of us who use it for what it actually does left in the lurch (eg #44142 (comment)). What is the migration path for those users?

  5. dmitshur commented on Feb 22, 2021

    @dmitshur
    Member

    Fixed by CL 292590, closing. (It didn't get closed automatically because the "golang/go" prefix wasn't included.)

    @magical The commit message suggests that the migration path is search engines like Google for general information about Go, and pkg.go.dev search for searching for Go packages and symbols. Issue #44142 is tracking improving results for queries like <pkg>.<sym>, and issue #41369 for prioritizing standard library results higher.

  6. mholt commented on Feb 22, 2021

    @mholt

    "Who moved my cheese?" 🧀

    What do you suggest for code search now? I will probably use Sourcegraph, but this URL is less convenient and linking to it from the Go website would be much appreciated.

  7. rsc commented on Feb 23, 2021

    @rsc
    ContributorAuthor

    @mholt, I'd suggest using https://cs.opensource.google/go for Go repo code search.

  8. JakeMont commented on Mar 17, 2021

    @JakeMont

    I'm also disappointed that this was removed without any real discussion. In particular for searching the standard libraries. The fact that Go's own website no longer provides a way to find a standard library function seems unfortunate. Personally, this was the way I typically looked up standard library functions. I'm still having trouble finding an acceptable alternative.

    For casual Go users and noobs, the fact that there is no "official" way to locate the "Rename" function may be a stumbling block.

    I'm not totally convinced by the OP's argument that the 'global' search was not useful, but even if that is so, then why not add a search just to the standard library documentation page: https://golang.org/pkg/ ? A good searchable standard library reference seems fundamental to any well maintained language.

    Other languages seem to provide this support:

    etc, etc.

  9. mholt commented on Mar 17, 2021

    @mholt

    Would the Go team consider re-adding a code search box to the Go website that simply utilizes an existing code search tool, at least?

  10. seankhliao commented on Mar 17, 2021

    @seankhliao
    Member

    note #44356 would redirect golang.org/pkg to pkg.go.dev

  11. gopherbot commented on Apr 20, 2021

    @gopherbot
    Contributor

    Change https://golang.org/cl/311969 mentions this issue: template: remove search box

  12. added a commit that references this issue on Apr 20, 2021
  13. added a commit that references this issue on May 26, 2021
  14. mleonhard commented on Jun 25, 2021

    @mleonhard
  15. rsc commented on Jun 25, 2021

    @rsc
    ContributorAuthor

    This issue tracker is for reporting issues with Go, not issues with Google itself.

  16. locked as off topic and limited conversation to collaborators on Jun 25, 2021
  17. removed their assignment
    on Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions