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: partial search doesn't return (any) matches which are "close" or latest #36806

Open
myitcv opened this issue Jan 27, 2020 · 4 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

@myitcv
Copy link
Member

myitcv commented Jan 27, 2020

What is the URL of the page with the issue?

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.66 Safari/537.36

Screenshot

For https://pkg.go.dev/search?q=goproxytes:

Screen Shot 2020-01-27 at 18 59 27

For https://pkg.go.dev/search?q=sh:

Screen Shot 2020-01-27 at 19 00 04

What did you do?

Visited either of the search results pages above.

What did you expect to see?

For https://pkg.go.dev/search?q=goproxytes I would expect to see https://pkg.go.dev/github.com/rogpeppe/go-internal/goproxytest?tab=doc in the results.

For https://pkg.go.dev/search?q=sh I would expect to see:

What did you see instead?

For https://pkg.go.dev/search?q=goproxytes, zero results.

For https://pkg.go.dev/search?q=sh a number of results which I would consider "further away" than https://pkg.go.dev/mvdan.cc/sh/v3/syntax?tab=doc

FYI @mvdan

@myitcv myitcv added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite labels Jan 27, 2020
@julieqiu
Copy link
Member

This is helpful, thanks! We are still tuning our search algorithm, so it's useful to know of these unexpected search results.

It sounds like there are a couple of suggestions here:

  • Support fuzzy matching (in the case of goproxytes)
  • Support searching by packages and modules.
  • Rank the newest version of a module in a series of modules, higher than older ones (i.e. mvdan.cc/sh/v3/syntax should be high up in the search results)

Also in the case of searching for sh, I'm seeing mvdan.cc/sh/syntaxas the third result, and mvdan.cc/sh/interp as the fourth. Are those results ones that you would expect?

image

@myitcv
Copy link
Member Author

myitcv commented Jan 30, 2020

Regarding "Support searching by packages and modules"

For this suggestion, are you expecting to see links to both package and modules in the search results?

Yes. I think both should be returned, and there be some indicator (icon/colour/etc) that distinguishes a package vs a module.

Or a filter to search by modules instead of packages as @mvdan mentioned in #36814?

My sense is that it should be possible to add something like is:package or is:module to further constrain the search query but that the default should return both packages and modules.

@myitcv
Copy link
Member Author

myitcv commented Jan 30, 2020

Ranking

Rank the newest version of a module in a series of modules, higher than older ones (i.e. mvdan.cc/sh/v3/syntax should be high up in the search results)

As a broad heuristic to feed into the overall ranking algorithm, this feels sensible.

Also in the case of searching for sh, I'm seeing mvdan.cc/sh/syntax as the third result, and mvdan.cc/sh/interp as the fourth. Are those results ones that you would expect?

@mvdan will confirm, but, given the previous point, I would have expected to see mvdan.cc/sh/v3/syntax above mvdan.cc/sh/syntax, i.e. the later module version's packages ranking higher than the earlier

Whilst we are here, searching for mvdan.cc/sh/v3 seems to rank non-v3 packages above v3 packages:

Screen Shot 2020-01-30 at 13 01 36

@eliasnaur
Copy link
Contributor

eliasnaur commented Apr 2, 2020

Another unfortunate query is https://pkg.go.dev/search?q=gio, where I would expect the gioui.org module and packages to come near the top. However, the first appearance is on page 3, for the gioui.org/ui package:

https://pkg.go.dev/search?page=3&q=gio

linking to

https://pkg.go.dev/gioui.org/ui

which doesn't even exist anymore (I removed /ui/ from gioui.org packages a while back).

@julieqiu julieqiu changed the title go.dev: partial search doesn't return (any) matches which are "close" or latest x/pkgsite: partial search doesn't return (any) matches which are "close" or latest Jun 15, 2020
@julieqiu julieqiu modified the milestones: Unreleased, pkgsite/search Aug 19, 2020
@julieqiu julieqiu removed the website label Sep 22, 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

5 participants