Official upstream source mirror. Do not make UH changes here.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lucy Stringer 326145c6f6
Merge pull request #3775 from alphagov/add-prometheus-labels-for-endpoints
[SCH-2365] Add prometheus label for sitemap endpoints
2026-09-28 15:50:35 +01:00
.github Build(deps): bump ruby/setup-ruby from 1.324.0 to 1.325.0 2026-09-24 20:43:14 +00:00
bin rename all "elastic search" to "open search" 2026-09-28 14:05:53 +01:00
config Rename all occurences of Elasticsearch to Opensearch 2026-09-28 14:05:52 +01:00
docs Rename all occurences of Elasticsearch to Opensearch 2026-09-28 14:05:52 +01:00
lib Merge branch 'main' into add-prometheus-labels-for-endpoints 2026-09-28 15:41:26 +01:00
log Empty /log directory 2016-04-26 11:02:50 +00:00
public Switch docroot to be public directory. 2014-01-06 10:42:45 +00:00
spec Merge branch 'main' into add-prometheus-labels-for-endpoints 2026-09-28 15:41:26 +01:00
.dockerignore Remove obsolete Jenkinsfile. 2024-01-31 16:20:47 +00:00
.gitignore Add spec/reports/pact to gitignore 2026-01-29 09:29:35 +00:00
.govuk_dependabot_merger.yml Configure auto-merging of some dependencies 2026-03-03 14:10:24 +00:00
.rspec Migrate support and config files 2017-09-25 13:30:13 +01:00
.rubocop.yml Add standard header to protect .rubocop.yml 2021-11-09 16:47:10 +00:00
.ruby-version update ruby to v3.4.8 2026-03-18 09:03:29 +00:00
config.ru Use env LOG_TO_STDOUT to enable stdout logging 2022-03-14 10:55:55 +00:00
Dockerfile Remove redundant TARGETPLATFORM setting 2026-06-12 15:42:25 +01:00
env.rb Make route registration configurable. 2011-12-20 13:43:55 +00:00
Gemfile Update Elasticsearch client to the latest OpenSearch one. 2026-09-17 12:10:22 +01:00
Gemfile.lock Build(deps): bump aws-sdk-s3 from 1.232.0 to 1.232.1 2026-09-21 20:42:53 +00:00
LICENCE Rename Licence reference in README 2022-12-02 15:22:03 +00:00
opensearch.yml Rename all occurences of ELASTICSEARCH to OPENSEARCH 2026-09-28 14:05:52 +01:00
Procfile update the procfile to reflect the removal of listen_to_publishing_queue 2026-04-22 14:19:26 +01:00
Rakefile Extract Rake task helper methods from Rakefile 2026-02-05 20:08:44 +00:00
README.md Rename all occurences of Elasticsearch to Opensearch 2026-09-28 14:05:52 +01:00

Search API

Search API (previously known as "rummager") indexes content into Opensearch and serves the GOV.UK Search API.

GOV.UK applications use the API to search and filter GOV.UK content. For example, alphagov/finder-frontend uses the search API to render finder pages (such as gov.uk/aaib-reports). search-api-v2 replaces Search API in several areas: for the latest on this, visit https://docs.publishing.service.gov.uk/manual/govuk-search.html.

Search API also provides a public API: https://www.gov.uk/api/search.json.

See the Search API user guide for how to use the public API.

Publishing finders

Search API is responsible for publishing "finders" and their corresponding email signup content items via a dedicated rake task:

FINDER_CONFIG=news_and_communications.yml \
EMAIL_SIGNUP_CONFIG=news_and_communications_email_signup.yml \
publishing_api:publish_finder

Technical documentation

Search API is a Sinatra application that interfaces with Opensearch.

You can use the GOV.UK Docker environment to run the application and its tests with all the necessary dependencies. Follow the usage instructions to get started.

To replicate real data into your local development environment, use the replicate-opensearch script provided by GOV.UK Docker.

Use GOV.UK Docker to run any commands that follow.

Running the test suite

bundle exec rake

Pact tests

Search API has a pact with GDS API Adapters.

See the guidance on Pact testing for how to run and modify the tests.

Note that when you run the tests locally logs are output to log/production.log rather than to the console.

Additional Docs

Licence

MIT License