If a user is looking for the symbol "DB.Begin", from package database/sql, we want them to be able to find this by searching for "DB.Begin" and "sql.DB.Begin". Searching for "sql.DB", "DB", "Begin" or "sql.DB" will not return "DB.Begin".
Group the build contexts as an array, with the format "<goos>/<goarch>". We only care about the build contexts when the default goos/goarch for the package page does not contain the matching symbol. TODO(https://golang/issue/44142): We could probably get away with storing just the GOOS value, since we don't really need the GOARCH to link to a symbol page. If we do that we should also change the column type to []goos. Store in order of the build context list at internal.BuildContexts.
`ARRAY_AGG(FORMAT('%s/%s', d.goos, d.goarch) ORDER BY CASE WHEN d.goos='linux' THEN 0 WHEN d.goos='windows' THEN 1 WHEN d.goos='darwin' THEN 2
If a user is looking for the symbol "DB.Begin", from package database/sql, we want them to be able to find this by searching for "DB.Begin", "Begin", and "sql.DB.Begin". Searching for "sql.DB" or "DB" will not return "DB.Begin". Index <package>.<identifier> (i.e. "sql.DB.Begin")
Index <identifier>, including the parent name (i.e. DB.Begin).
`SETWEIGHT( TO_TSVECTOR('simple', s1.name),
Index <identifier> without parent name (i.e. "Begin"). This is weighted less, so that if other symbols are just named "Begin" they will rank higher in a search for "Begin".
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.