-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: support searching by <package>.<identifier> #44142
Comments
I'd go further and allow searching for just |
To add another datapoint, this Go Tour page links to https://golang.org/search?q=Read#Global. The link is currently broken and I couldn't find a good pkgsite alternative to replace it. |
Change https://golang.org/cl/318651 mentions this issue: |
Change https://golang.org/cl/318490 mentions this issue: |
Change https://golang.org/cl/318489 mentions this issue: |
Change https://golang.org/cl/318650 mentions this issue: |
Change https://golang.org/cl/318652 mentions this issue: |
For golang/go#44142 Change-Id: I9d1908b07924a02153a249773d9440676a0e349a Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318489 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
The search_documents columns package_path_id and module_path_id are now populated. For golang/go#44142 Change-Id: I1833bfc821f3a3ebe5b71a562e616d0c6b2dc20a Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318490 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
A table is added to contain information for searching for symbols. Build contexts are added as a text array instead of as individual rows, since the only use case for that information is linking users to the correct URL if the symbol is not present in the default build context. For golang/go#44142 Change-Id: I759b22e0ced7fec547778aba11a1b5f641530fb8 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318650 Trust: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
getPackageSymbols is refactored using squirrel, so that it can be modified for us in other similar queries. For golang/go#44142 Change-Id: I974c51155d30c59cf61ded0386c5d3b2702188c5 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318651 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
Change https://golang.org/cl/318871 mentions this issue: |
Change https://golang.org/cl/318870 mentions this issue: |
Data is now inserted into symbol_search_documents. For golang/go#44142 Change-Id: Icf00cd7c5e57a91465673d1828f961334abc3a48 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318652 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
An initial version of symbol search is added. This runs separately from regular search and is not connected to the frontend yet. For golang/go#44142 Change-Id: I34a21a4a743a07dcfcdfeb64b52a86bc2254f62a Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318870 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
The frontend now supports searching for symbols using the syntax "identifier:<query>". For golang/go#44142 Change-Id: Iae1db22091cf3921d47fbbdbdfbbf87e25792fd9 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318871 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
Change https://golang.org/cl/329497 mentions this issue: |
Change https://golang.org/cl/329349 mentions this issue: |
Change https://golang.org/cl/329493 mentions this issue: |
Logic for insertSymbols is moved out of insertUnits to saveModule. This will allows us to run that code after the check for isLatest, which is necessary to insert symbols where the latest unit is not a release version. For golang/go#44142 Change-Id: Id917b6b74020957549ad1c6594f21d3f8d27e464 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/329349 Trust: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
upsertSearchDocumentSymbols is changed based on the new schema. For golang/go#44142 Change-Id: I1857b04cceeb9b702e4c54fc3a8d39efa811a3ce Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/329493 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
The search examples on the homepage are updated to reflect the updated search heuristics. For golang/go#44142 Change-Id: I2154485580d6b3c43c87cf1169e72429d709c95a Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/348374 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
Change https://golang.org/cl/348814 mentions this issue: |
If a user searches for #DB, they will always be brought to the symbols tab. However, if they click on the packages tab from that page, we want them to see something useful. As a result, the packages tab now has href set to: /search?m=package&q=<query-stripped-of-filters. For golang/go#44142 Change-Id: Iff7f3d8b3f8752a40855b816cc94354b0f7ea93f Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/348814 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
For golang/go#44142 Change-Id: I79d57d96f033197298d9f2219f6acaeeabcc873a Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/349609 Trust: Julie Qiu <julie@golang.org> Reviewed-by: Jamal Carvalho <jamal@golang.org>
Change https://golang.org/cl/349609 mentions this issue: |
Change https://golang.org/cl/349896 mentions this issue: |
Change https://golang.org/cl/349892 mentions this issue: |
Change https://golang.org/cl/349610 mentions this issue: |
Change https://golang.org/cl/350129 mentions this issue: |
Change https://golang.org/cl/350130 mentions this issue: |
When the latest version of a module is inserted, delete symbol_search_documents rows for symbols not in that version of the package, so that stale rows are removed. For golang/go#44142 Change-Id: I9a5c45eff4713cb765fd15b57530bf139385a3a8 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/349892 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
internal/postgres/symbolsearch is renamed to internal/postgres/search, since the package search queries will also be moved in the next CL. For golang/go#44142 Change-Id: Ieee78787406e969ab838859526855b8f892438b1 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/350129 Reviewed-by: Jamal Carvalho <jamal@golang.org> Trust: Julie Qiu <julie@golang.org>
Query is renamed to SymbolQuery, since the package was renamed from symbolsearch to search. For golang/go#44142 Change-Id: I02c2f04305d604a3b4efc60708154bd53e07fd11 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/350130 Trust: Julie Qiu <julie@golang.org> Reviewed-by: Jamal Carvalho <jamal@golang.org>
Change https://golang.org/cl/351092 mentions this issue: |
Change https://golang.org/cl/346169 mentions this issue: |
Now that symbol_search_documents.symbol_name is populated in all environments, a NOT NULL constraint is added. For golang/go#44142 Change-Id: I04a852084a7fe36ff9da2725bd0f8e6ecb9d5524 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/346169 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org>
Change https://golang.org/cl/355229 mentions this issue: |
Previously, the search filter # only defaulted to symbol search mode when it was on the first word of a search. It now works regardless of which word has the filter. For golang/go#44142 Change-Id: Id32010f9071c7f5db82127a490372fdf89548fe5 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/355229 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org>
Change https://golang.org/cl/358474 mentions this issue: |
Change https://golang.org/cl/358475 mentions this issue: |
For golang/go#44142 Change-Id: I053c36aa995be2cd87075b5a5938b1fc5728a97d Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/358474 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
Instead of using symbol_search_documents.ln_imported_by_count, use search_documents.ln_imported_by_count. For golang/go#44142 Change-Id: I16a91fd5eb674a27e1f3bd3703d1c4ff3b58deb5 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/358475 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com>
The search help page is updated based on the new search redesign. For golang/go#44142 Change-Id: Icdc75e2077ab38028e3a79967b2a104b776854ca Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/351092 Trust: Julie Qiu <julie@golang.org> Reviewed-by: Jamal Carvalho <jamal@golang.org>
This is live on pkg.go.dev! See https://go.dev/blog/pkgsite-search-redesign for details. |
Thank you!
|
What is the URL of the page with the issue?
https://pkg.go.dev/search?q=sql.DB
What is your user agent?
Mozilla/5.0 (X11; CrOS x86_64 13597.66.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.109 Safari/537.36
Screenshot
What did you do?
I wanted to view the documentation for
sql.DB
, which is part of the standard distribution. I entered the search query ofsql.DB
into the interface, and it gave me no good results.What did you expect to see?
Basically this but on the new web site: https://golang.org/pkg/database/sql/#DB
What did you see instead?
I don't know how the web application is implemented, but I expect either standard distribution packages are not indexed, the search query format "<package name>.<Identifier>" is not supported, or the result ranking is somehow deficient. I had been using this on old Godoc with great success since time immemorial.
The text was updated successfully, but these errors were encountered: