Skip to content

Commit

Permalink
Turn /search/advanced into a special route
Browse files Browse the repository at this point in the history
We don't use this finder any more, finder-frontend redirects it to
some other finder:
https://github.com/alphagov/finder-frontend/blob/master/app/controllers/redirection_controller.rb#L33

We still need the route, so put it in the SpecialRoutePublisher
instead.
  • Loading branch information
barrucadu committed Feb 10, 2020
1 parent 58ce046 commit 5af4254
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 76 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ These are used by [search admin](https://github.com/alphagov/search-admin/).
- [Schemas](doc/schemas.md): how to work with schemas and the document types
- [Popularity information](doc/popularity.md): Search API uses Google Analytics
data to improve search results.
- [Publishing advanced search](doc/advanced-search.md): Information about the advanced search finder
- [Publishing document finders](doc/publishing-finders.md): Information about publishing finders using rake tasks

## Licence
Expand Down
65 changes: 0 additions & 65 deletions config/finders/advanced-search.yml

This file was deleted.

8 changes: 0 additions & 8 deletions doc/advanced-search.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/publishing-finders.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Search API is currently used to publish some finders which do not fit
the standard specialist document finder pattern. These are:

- Advanced search, available at the path `/search/advanced`
- Find EU Exit guidance for business (currently in development)

The configuration for the EU Exit business finder can be found in YAML files in
Expand Down
8 changes: 8 additions & 0 deletions lib/special_route_publisher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ def routes
description: "Sitewide search results are displayed in JSON format here.",
type: "exact",
},
{
rendering_app: "finder-frontend",
content_id: "3df77dea-00c5-43f0-8f31-d08b8bd2a4d6",
base_path: "/search/advanced",
title: "Latest on GOV.UK",
description: "Sitewide search results with advanced filtering are displayed here.",
type: "exact",
},
{
rendering_app: "finder-frontend",
content_id: "ba750368-8001-4d01-bd57-cec589153fdd",
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/publishing_api_finder_publisher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require "publishing_api_finder_publisher"

RSpec.describe PublishingApiFinderPublisher do
["advanced-search.yml", "find-eu-exit-guidance-business.yml"].each do |config_file|
["find-eu-exit-guidance-business.yml"].each do |config_file|
subject(:instance) { described_class.new(finder, timestamp) }

let(:finder) {
Expand Down

0 comments on commit 5af4254

Please sign in to comment.