commit | b48301ecae3ebc7c7e2f343909f7109629dfb1b5 | [log] [tgz] |
---|---|---|
author | Jonathan Amsterdam <jba@google.com> | Fri Jul 23 08:33:11 2021 -0400 |
committer | Jonathan Amsterdam <jba@google.com> | Fri Jul 23 20:25:58 2021 +0000 |
tree | 7777917125ccdf58762fae723091f9358687ded9 | |
parent | 5154d97bc474524e1c219d0e0428c826acabc488 [diff] |
internal/postgres: repeat search when grouping When grouping results, search a second time with a larger limit if the first doesn't return enough results. Also, remove the Limit search option; it is an implementation detail that should be determined by DB.Search. I tested this against 176 distinct queries obtained from the logs over a 1-hour period, with max results = 10. Although it was somewhat slower than without grouping, the 99%ile was still under 1 second. For golang/go#47320 Change-Id: Ie09d6b83bc270a7113abd74b03daf26fa6054b0f Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/336950 Trust: Jonathan Amsterdam <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org> Reviewed-by: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com>
Pkg.go.dev is a website for discovering and evaluating Go packages and modules.
You can check it out at https://pkg.go.dev.
If you want to report a bug or have a feature suggestion, please first check the known issues to see if your issue is already being discussed. If an issue does not already exist, feel free to file an issue.
For answers to frequently asked questions, see go.dev/about.
You can also chat with us on the #pkgsite Slack channel on the Gophers Slack.
We would love your help!
Our canonical Git repository is located at go.googlesource.com/pkgsite. There is a mirror of the repository at github.com/golang/pkgsite.
To contribute, please read our contributing guide.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.