diff options
| author | Jonathan Amsterdam <jba@google.com> | 2020-03-30 17:18:52 -0400 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2020-04-14 17:28:08 +0000 |
| commit | ba9b5823bf00a1fd5e754b72936473a92514ebe2 (patch) | |
| tree | a87b4653720656def35aa5a27b0719517587257d /internal/stdlib/testdata | |
| parent | 86348f6125d8422c830a3ca3c67f247962fbea1c (diff) | |
| download | go-x-pkgsite-ba9b5823bf00a1fd5e754b72936473a92514ebe2.tar.xz | |
internal/postgres: change search tokens
Change the way that the Postgres ts_vector (list of search tokens) is computed.
- Use the path_tokens text configuration when creating the tsvector for the path.
- Construct sections B and C of the search document by combining the synopsis
part of the README. Parts of this processing are:
- Extract only the text of a markdown README, to remove images and
other extraneous information.
- Add alternatives to certain words in the synopsis and README. For
example, add "postgresql" whenever we see "postgres".
- Modify the ts_rank call in the code to use a B weight of 1.
- Change the call to the database search function so that it invokes
the function that has a B weight of 1.
These changes will require re-computing the
search_documents.tsv_search_tokens column. That should be done after
these are deployed.
Change-Id: Ib81601326f11efd81c8bc733694a000eccecf12b
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/705958
Reviewed-by: Julie Qiu <julieqiu@google.com>
Diffstat (limited to 'internal/stdlib/testdata')
0 files changed, 0 insertions, 0 deletions
