aboutsummaryrefslogtreecommitdiff
path: root/internal/testing/sample/sample.go
diff options
context:
space:
mode:
authorRob Findley <rfindley@google.com>2019-11-19 13:53:35 -0500
committerJulie Qiu <julie@golang.org>2020-03-27 16:46:48 -0400
commit4e2561863138e95e0eaed3290e80a764043165a6 (patch)
tree6b88669c4d5e095284755b4202e07b3184d6a228 /internal/testing/sample/sample.go
parent9d2ae5274bb08730ce7e7fc9d2bfd2c8e051c989 (diff)
downloadgo-x-pkgsite-4e2561863138e95e0eaed3290e80a764043165a6.tar.xz
internal/frontend: add an autocompletion endpoint
Now that completion data is being populated by the ETL, we can use it to provide a JSON API for search autocompletions at /autocomplete?q=query. This API reads lexical completions from Redis, sorts according to a scoring heuristic, and returns the results as a JSON array. For testing purposes, the pathCompletions function is moved from the etl package to the complete package, and exported. Updates b/143370178 Change-Id: I61d75296399222fa9ebfe8aadc909bf048389a23 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/602064 Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'internal/testing/sample/sample.go')
0 files changed, 0 insertions, 0 deletions