Skip to content

alphagov/search-api

Repository files navigation

Search API

Search API (née "rummager") indexes content into Elasticsearch 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?q=taxes.

Finally, 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 Elasticsearch.

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.

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

Running the test suite

bundle exec rake

Additional Docs

Licence

MIT License