Last updated: 9 Dec 2024
Update the search autocomplete denylist
The autocomplete functionality for GOV.UK Site Search makes use of a denylist to avoid suggesting terms that are not suitable for GOV.UK.
To update this list requires following a manual process:
- In a text editor create a new empty file, save this file as
denylist.jsonl
- Access the spreadsheet and apply the desired changes to the appropriate spreadsheet
- Copy and paste the contents from the “denylist” column from each spreadsheet into your created
denylist.jsonl
file
Then for each GOV.UK environment of integration, staging and production:
- Log into Google Cloud and access the
Search API V2 <environment>
project - Access “Cloud Storage” > “Buckets” and find the
search-api-v2-<environment>_vais_artifacts
bucket - Upload the
denylist.jsonl
file to the bucket, replacing the existing file - Leave Google Cloud and open your terminal
- Log into the appropriate environment for Kubernetes
- Run the
rake autocomplete:update_denylist
rake task forsearch-api-v2
to import the file
If there are problems updating the denylist we can consider disabling the autocomplete feature temporarily to provide time to resolve the problem.