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/website: remove search box from golang.org #44357

Closed
rsc opened this issue Feb 18, 2021 · 11 comments
Closed

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

rsc opened this issue Feb 18, 2021 · 11 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Feb 18, 2021

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.

@rsc rsc added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 18, 2021
@rsc rsc added this to the Unreleased milestone Feb 18, 2021
@rsc rsc self-assigned this Feb 18, 2021
@magical
Copy link
Contributor

magical commented Feb 20, 2021

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?

@dmitshur
Copy link
Contributor

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.

@mholt
Copy link

mholt commented Feb 22, 2021

"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.

@rsc
Copy link
Contributor Author

rsc commented Feb 23, 2021

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

@JakeMont
Copy link

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.

@mholt
Copy link

mholt commented Mar 17, 2021

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?

@seankhliao
Copy link
Member

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

@ALTree ALTree mentioned this issue Mar 25, 2021
@gopherbot
Copy link

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

gopherbot pushed a commit to golang/blog that referenced this issue Apr 20, 2021
The custom search algorithm that was previously implemented and served
on the golang.org website has been removed via CL 292590 and CL 293412,
so remove the search box in the blog.golang.org header too.

For golang/go#44357.
Fixes golang/go#44912.

Change-Id: I51478ccb568e94df50d0dc6920a26c8f30a04c3c
Reviewed-on: https://go-review.googlesource.com/c/blog/+/311969
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
gopherbot pushed a commit to golang/website that referenced this issue May 26, 2021
The custom search algorithm that was previously implemented and served
on the golang.org website has been removed via CL 292590 and CL 293412,
so remove the search box in the blog.golang.org header too.

For golang/go#44357.
Fixes golang/go#44912.

Change-Id: I51478ccb568e94df50d0dc6920a26c8f30a04c3c
Reviewed-on: https://go-review.googlesource.com/c/blog/+/311969
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
X-Blog-Commit: 5d47918ba6b83a86f5752483a2310cda931dd255
@mleonhard

This comment has been minimized.

@rsc
Copy link
Contributor Author

rsc commented Jun 25, 2021

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

@golang golang locked as off-topic and limited conversation to collaborators Jun 25, 2021
@rsc rsc removed their assignment Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

9 participants