From 29b0c2fe375abff9c6de791d06c6b02c50f67664 Mon Sep 17 00:00:00 2001 From: Minno Dang Date: Fri, 1 Nov 2024 10:48:33 +0000 Subject: [PATCH] WIP - Add new endpoint to query specialist-finder index --- lib/rummager/app.rb | 21 + lib/search/query_builder.rb | 15 +- lib/search_config.rb | 24 +- lib/search_server.rb | 3 +- .../search_specialist_documents_spec.rb | 545 ++++++++++++++++++ .../support/search_integration_spec_helper.rb | 40 +- spec/unit/index_group_spec.rb | 2 +- spec/unit/time_based_index_cleanup_spec.rb | 2 +- 8 files changed, 627 insertions(+), 25 deletions(-) create mode 100644 spec/integration/search/search_specialist_documents_spec.rb diff --git a/lib/rummager/app.rb b/lib/rummager/app.rb index 1b04dfb01..9c7a193b8 100644 --- a/lib/rummager/app.rb +++ b/lib/rummager/app.rb @@ -143,6 +143,27 @@ def json_only halt(500, env["sinatra.error"].message) end + # Return results for the Specialist Finder searches + # + # For details, see docs/search-api.md + ["/specialist-documents-search.?:request_format?", "/api/specialist-documents-search.?:request_format?"].each do |path| + get path do + json_only + + query_params = parse_query_string(request.query_string) + + begin + results = SearchConfig.run_specialist_document_search(query_params) + rescue BaseParameterParser::ParseError => e + status 422 + return { error: e.error }.to_json + end + + headers["Access-Control-Allow-Origin"] = "*" + results.to_json + end + end + # Return results for the GOV.UK site search # # For details, see docs/search-api.md diff --git a/lib/search/query_builder.rb b/lib/search/query_builder.rb index e2bfb75a2..4a3831dab 100644 --- a/lib/search/query_builder.rb +++ b/lib/search/query_builder.rb @@ -64,13 +64,26 @@ def query end def filter + return specialist_documents_post_filter if content_index_names.include?(SearchConfig.specialist_finder_index_name) + Search::FormatMigrator.new( search_params.search_config, base_query: QueryComponents::Filter.new(search_params).payload, ).call end - private + def specialist_documents_post_filter + { bool: + { + minimum_should_match: 1, + should: [{ + bool: { must: QueryComponents::Filter.new(search_params).payload } + }], + }, + } + end + + private attr_reader :content_index_names, :metasearch_index diff --git a/lib/search_config.rb b/lib/search_config.rb index 6ef9c1414..5d78dbc8a 100644 --- a/lib/search_config.rb +++ b/lib/search_config.rb @@ -52,6 +52,11 @@ def run_search(raw_parameters) search_params.search_config.run_search_with_params(search_params) end + def run_specialist_document_search(raw_parameters) + search_params = parse_parameters(raw_parameters) + search_params.search_config.run_specialist_document_search_with_params(search_params) + end + def run_batch_search(searches) search_params = [] searches.each do |search| @@ -106,7 +111,7 @@ def search_server SearchConfig.index_names, SearchConfig.govuk_index_name, SearchConfig.content_index_names, - self, + self ) end @@ -121,6 +126,10 @@ def run_search_with_params(search_params) searcher.run(search_params) end + def run_specialist_document_search_with_params(search_params) + specialist_document_searcher.run(search_params) + end + def run_batch_search_with_params(search_params) batch_searcher.run(search_params) end @@ -149,6 +158,10 @@ def new_content_index @new_content_index ||= search_server.index_for_search([SearchConfig.govuk_index_name]) end + def specialist_documents_content_index + @specialist_documents_content_index ||= search_server.index_for_search(SearchConfig.content_index_names + [SearchConfig.specialist_finder_index_name]) + end + def base_uri cluster.uri end @@ -177,6 +190,15 @@ def searcher ) end + def specialist_document_searcher + @specialist_document_searcher ||= Search::Query.new( + content_index: specialist_documents_content_index, + registries:, + metasearch_index:, + spelling_index:, + ) + end + def batch_searcher @batch_searcher ||= Search::BatchQuery.new( content_index:, diff --git a/lib/search_server.rb b/lib/search_server.rb index 132fe9cf0..839b9801b 100644 --- a/lib/search_server.rb +++ b/lib/search_server.rb @@ -12,6 +12,7 @@ def initialize(base_uri, schema, index_names, govuk_index_name, content_index_na @govuk_index_name = govuk_index_name @content_index_names = content_index_names @search_config = search_config + @specialist_finder_index_name = SearchConfig.specialist_finder_index_name end def index_group(prefix) @@ -52,7 +53,7 @@ def validate_index_name!(index_name) def index_name_valid?(index_name) index_name.split(",").all? do |name| - @index_names.include?(name) || @govuk_index_name == name + @index_names.include?(name) || @govuk_index_name == name || @specialist_finder_index_name == name end end end diff --git a/spec/integration/search/search_specialist_documents_spec.rb b/spec/integration/search/search_specialist_documents_spec.rb new file mode 100644 index 000000000..9473b350f --- /dev/null +++ b/spec/integration/search/search_specialist_documents_spec.rb @@ -0,0 +1,545 @@ +require "spec_helper" +require_relative "../../support/search_integration_spec_helper" + +RSpec.configure do |c| + c.include SearchIntegrationSpecHelper +end + +RSpec.describe "SearchSpecialistDocumentsTest" do + let(:index) { "specialist-finder_test" } + + it "returns success" do + get "/specialist-documents-search?q=important" + + expect(last_response).to be_ok + end + + it "spell checking with typo" do + document_params = { + "slug" => "/ministry-of-magic", + "link" => "/ministry-of-magic-site", + "title" => "Ministry of Magic", + } + commit_document(index, document_params) + + get "/specialist-documents-search?q=ministry of magick&suggest=spelling" + + expect(parsed_response["suggested_queries"]).to eq(["ministry of magic"]) + end + + it "highlights spelling suggestions" do + document_params = { + "slug" => "/ministry-of-magic", + "link" => "/ministry-of-magic-site", + "title" => "Ministry of Magic", + } + commit_document(index, document_params) + + get "/specialist-documents-search?q=ministry of magick&suggest=spelling_with_highlighting" + + expect(parsed_response["suggested_queries"]).to eq([{ + "text" => "ministry of magic", + "highlighted" => "ministry of magic", + }]) + end + + it "spell checking with blocklisted typo" do + commit_document( + index, + { + "title" => "Brexitt", + "description" => "Brexitt", + "link" => "/brexitt", + }, + ) + + get "/specialist-documents-search?q=brexit&suggest=spelling" + + expect(parsed_response["suggested_queries"]).to eq([]) + end + + it "spell checking without typo" do + add_sample_documents(index, 1) + + get "/specialist-documents-search?q=milliband" + + expect(parsed_response["suggested_queries"]).to eq([]) + end + + it "sort by date ascending" do + add_sample_documents(index, 2) + + get "/specialist-documents-search?q=important&order=public_timestamp" + + expect(result_links.take(2)).to eq(["/specialist-finder-1", "/specialist-finder-2"]) + end + + it "sort by date descending" do + add_sample_documents(index, 2) + + get "/specialist-documents-search?q=important&order=-public_timestamp" + + # The government links have dates, so appear before all the other links. + # The other documents have no dates, so appear in an undefined order + expect(result_links.take(2)).to eq(["/specialist-finder-1", "/specialist-finder-2"]) + end + + it "sort by title ascending" do + add_sample_documents(index, 1) + + get "/specialist-documents-search?order=title" + lowercase_titles = result_titles.map(&:downcase) + + expect(lowercase_titles).to eq(["sample specialist-finder document 1"]) + end + + it "filter by field" do + add_sample_documents(index, 1) + + get "/specialist-documents-search?filter_mainstream_browse_pages=browse/page/1" + + expect(result_links.sort).to eq(["/specialist-finder-1"]) + end + + it "reject by field" do + add_sample_documents(index, 2) + + get "/specialist-documents-search?reject_mainstream_browse_pages=browse/page/1" + + expect(result_links.sort).to eq(["/specialist-finder-2"]) + end + + it "can filter for missing field" do + add_sample_documents(index, 1) + + get "/specialist-documents-search?filter_manual=_MISSING" + + expect(result_links.sort).to eq(["/specialist-finder-1"]) + end + + it "can filter for missing or specific value in field" do + add_sample_documents(index, 1) + + get "/specialist-documents-search?filter_document_type[]=_MISSING&filter_document_type[]=edition" + + expect(result_links.sort).to eq(["/specialist-finder-1"]) + end + + it "can filter and reject" do + add_sample_documents(index, 2) + + get "/specialist-documents-search?reject_mainstream_browse_pages=1&filter_document_type[]=edition" + + expect(result_links.sort).to eq(["/specialist-finder-1", "/specialist-finder-2"]) + end + + describe "filter/reject when an attribute has multiple values" do + before do + commit_document( + index, + { + "link" => "/one", + "part_of_taxonomy_tree" => %w[a b c], + }, + ) + commit_document( + index, + { + "link" => "/two", + "part_of_taxonomy_tree" => %w[d e f], + }, + ) + commit_document( + index, + { + "link" => "/three", + "part_of_taxonomy_tree" => %w[b e], + }, + ) + end + + describe "filter_all" do + it "filters all documents containing taxon b and e" do + get "/specialist-documents-search?filter_all_part_of_taxonomy_tree=b&filter_all_part_of_taxonomy_tree=e" + expect(result_links.sort).to eq([ + "/three", + ]) + end + end + + describe "filter_any" do + it "filters any document containing taxon c or f" do + get "/specialist-documents-search?filter_any_part_of_taxonomy_tree=c&filter_any_part_of_taxonomy_tree=f" + expect(result_links.sort).to match_array([ + "/one", "/two" + ]) + end + end + + describe "reject_all" do + it "rejects all documents containing taxon b and e" do + get "/specialist-documents-search?reject_all_part_of_taxonomy_tree=b&reject_all_part_of_taxonomy_tree=e" + expect(result_links.sort).to match_array([ + "/one", "/two" + ]) + end + end + + describe "reject_any" do + it "rejects any documents containing taxon c or f" do + get "/specialist-documents-search?reject_any_part_of_taxonomy_tree=c&reject_any_part_of_taxonomy_tree=f" + expect(result_links.sort).to match_array([ + "/three", + ]) + end + end + end + + describe "boolean filtering" do + context "when boolean filters are not true or false" do + it "returns an error" do + get "/specialist-documents-search?filter_is_withdrawn=blah" + + expect(last_response.status).to eq(422) + expect(parsed_response).to eq({ "error" => "is_withdrawn requires a boolean (true or false)" }) + end + end + + context "when an invalid filter is used" do + it "returns an error" do + get "/specialist-documents-search?filter_has_some_very_incorrect_filter=false" + + expect(last_response.status).to eq(422) + expect(parsed_response).to eq({ "error" => "\"has_some_very_incorrect_filter\" is not a valid filter field" }) + end + end + + context "when a valid filter is used" do + before do + add_sample_documents(index, 2) + document_params = { + "slug" => "/ministry-of-magic", + "link" => "/ministry-of-magic-site", + "title" => "Ministry of Magic", + "has_official_document" => true, + } + commit_document("government_test", document_params) + + document_params = { + "title" => "Advice on Treatment of Dragons", + "link" => "/dragon-guide", + "has_official_document" => false, + } + commit_document("government_test", document_params) + end + + it "can filter on boolean fields = true" do + get "/specialist-documents-search?filter_has_official_document=true" + expect(result_links.sort).to eq(%w[/ministry-of-magic-site]) + end + + it "can filter on boolean fields = false" do + get "/specialist-documents-search?filter_has_official_document=false" + + expect(result_links.sort).to eq(%w[/dragon-guide]) + end + end + end + + it "only contains fields which are present" do + add_sample_documents(index, 2) + + get "/specialist-documents-search?q=important&order=public_timestamp" + + results = parsed_response["results"] + expect(results[1]["title"]).to eq("Sample specialist-finder document 2") + end + + it "validates integer params" do + get "/specialist-documents-search?start=a" + + expect(last_response.status).to eq(422) + expect(parsed_response).to eq({ "error" => "Invalid value \"a\" for parameter \"start\" (expected positive integer)" }) + end + + it "allows integer params leading zeros" do + get "/specialist-documents-search?start=09" + + expect(last_response).to be_ok + end + + it "validates unknown params" do + get "/specialist-documents-search?foo&bar=1" + + expect(last_response.status).to eq(422) + expect(parsed_response).to eq("error" => "Unexpected parameters: foo, bar") + end + + it "debug explain returns explanations" do + add_sample_documents(index, 1) + + get "/specialist-documents-search?debug=explain" + + first_hit_explain = parsed_response["results"].first["_explanation"] + expect(first_hit_explain).not_to be_nil + expect(first_hit_explain.keys).to include("value") + expect(first_hit_explain.keys).to include("description") + expect(first_hit_explain.keys).to include("details") + end + + it "can scope by elasticsearch type" do + commit_document(index, cma_case_attributes, type: "cma_case") + + get "/specialist-documents-search?filter_document_type=cma_case" + + expect(last_response).to be_ok + expect(parsed_response.fetch("total")).to eq(1) + expect(parsed_response.fetch("results").fetch(0)).to match( + hash_including( + "document_type" => "cma_case", + "title" => cma_case_attributes.fetch("title"), + "link" => cma_case_attributes.fetch("link"), + ), + ) + end + + it "can filter between dates" do + commit_document(index, cma_case_attributes, type: "cma_case") + + get "/specialist-documents-search?filter_document_type=cma_case&filter_opened_date=from:2014-03-31,to:2014-04-02" + + expect(last_response).to be_ok + expect(parsed_response.fetch("total")).to eq(1) + expect(parsed_response.fetch("results").fetch(0)).to match( + hash_including( + "title" => cma_case_attributes.fetch("title"), + "link" => cma_case_attributes.fetch("link"), + ), + ) + end + + it "can filter between dates with reversed parameter order" do + commit_document(index, cma_case_attributes, type: "cma_case") + + get "/specialist-documents-search?filter_document_type=cma_case&filter_opened_date=to:2014-04-02,from:2014-03-31" + + expect(last_response).to be_ok + expect(parsed_response.fetch("total")).to eq(1) + expect(parsed_response.fetch("results").fetch(0)).to match( + hash_including( + "title" => cma_case_attributes.fetch("title"), + "link" => cma_case_attributes.fetch("link"), + ), + ) + end + + it "can filter from date" do + commit_filter_from_date_documents(index) + get "/specialist-documents-search?filter_document_type=cma_case&filter_opened_date=from:2014-03-31" + + expect(last_response).to be_ok + expect_response_includes_matching_date_and_datetime_results(parsed_response.fetch("results")) + end + + it "can filter from time" do + commit_filter_from_time_documents(index) + get "/specialist-documents-search?filter_document_type=cma_case&filter_opened_date=from:2014-03-31 14:00:00" + + expect(last_response).to be_ok + expect_response_includes_matching_date_and_datetime_results(parsed_response.fetch("results")) + end + + it "can filter to date" do + commit_filter_to_date_documents(index) + get "/specialist-documents-search?filter_document_type=cma_case&filter_opened_date=to:2014-04-02" + + expect(last_response).to be_ok + expect_response_includes_matching_date_and_datetime_results(parsed_response.fetch("results")) + end + + it "can filter to time" do + commit_filter_to_time_documents(index) + + get "/specialist-documents-search?filter_document_type=cma_case&filter_opened_date=to:2014-04-02 11:00:00" + + expect(last_response).to be_ok + expect_response_includes_matching_date_and_datetime_results(parsed_response.fetch("results")) + end + + it "can filter times in different time zones" do + commit_document( + index, + cma_case_attributes("opened_date" => "2017-07-01T11:20:00.000-03:00", "link" => "/cma-1"), + type: "cma_case", + ) + commit_document( + index, + cma_case_attributes("opened_date" => "2017-07-02T00:15:00.000+01:00", "link" => "/cma-2"), + type: "cma_case", + ) + + get "/specialist-documents-search?filter_document_type=cma_case&filter_opened_date=from:2017-07-01 12:00,to:2017-07-01 23:30:00" + + expect(last_response).to be_ok + expect(parsed_response.fetch("results")).to contain_exactly( + hash_including("link" => "/cma-1"), + hash_including("link" => "/cma-2"), + ) + end + + it "cannot provide date filter key multiple times" do + get "/specialist-documents-search?filter_document_type=cma_case&filter_opened_date[]=from:2014-03-31&filter_opened_date[]=to:2014-04-02" + + expect(last_response.status).to eq(422) + expect( + parsed_response, + ).to eq( + { "error" => %{Too many values (2) for parameter "opened_date" (must occur at most once)} }, + ) + end + + it "cannot provide invalid dates for date filter" do + get "/specialist-documents-search?filter_document_type=cma_case&filter_opened_date=from:not-a-date" + + expect(last_response.status).to eq(422) + expect( + parsed_response, + ).to eq( + { "error" => %{Invalid "from" value "not-a-date" for parameter "opened_date" (expected ISO8601 date)} }, + ) + end + + it "expands organisations" do + document_params = { + "title" => "Advice on Treatment of Dragons", + "link" => "/dragon-guide", + "organisations" => ["/ministry-of-magic"], + } + commit_document("government_test", document_params) + + document_params = { + "slug" => "/ministry-of-magic", + "link" => "/ministry-of-magic-site", + "title" => "Ministry of Magic", + "format" => "organisation", + } + commit_document("government_test", document_params) + + get "/specialist-documents-search.json?q=dragons" + + expect(first_result["organisations"]).to eq( + [{ "slug" => "/ministry-of-magic", + "link" => "/ministry-of-magic-site", + "title" => "Ministry of Magic" }], + ) + end + + it "also works with the /api prefix" do + document_params = { + "slug" => "/ministry-of-magic", + "link" => "/ministry-of-magic-site", + "title" => "Ministry of Magic", + "format" => "organisation", + } + commit_document("government_test", document_params) + + document_params = { + "title" => "Advice on Treatment of Dragons", + "link" => "/dragon-guide", + "organisations" => ["/ministry-of-magic"], + } + commit_document("government_test", document_params) + + get "/api/specialist-documents-search.json?q=dragons" + + expect(first_result["organisations"]).to eq( + [{ "slug" => "/ministry-of-magic", + "link" => "/ministry-of-magic-site", + "title" => "Ministry of Magic" }], + ) + end + + it "expands organisations via content_id" do + document_params = { + "slug" => "/ministry-of-magic", + "link" => "/ministry-of-magic-site", + "title" => "Ministry of Magic", + "content_id" => "organisation-content-id", + "format" => "organisation" + } + commit_document("government_test", document_params) + + document_params = { + "title" => "Advice on Treatment of Dragons", + "link" => "/dragon-guide", + "organisation_content_ids" => %w[organisation-content-id], + } + commit_document("government_test", document_params) + + get "/specialist-documents-search.json?q=dragons" + + # Adds a new key with the expanded organisations + expect_result_includes_ministry_of_magic_for_key(first_result, "expanded_organisations", "content_id" => "organisation-content-id") + + # Keeps the organisation content ids + expect( + first_result["organisation_content_ids"], + ).to eq( + %w[organisation-content-id], + ) + end + + it "will show the query" do + get "/specialist-documents-search?q=test&debug=show_query" + + expect(parsed_response.fetch("elasticsearch_query")).to be_truthy + end + + it "will show the cluster" do + get "/specialist-documents-search?q=test" + expect(parsed_response.fetch("es_cluster")).to eq(Clusters.default_cluster.key) + + Clusters.active.each do |cluster| + get "/specialist-documents-search?q=test&ab_tests=search_cluster_query:#{cluster.key}" + expect(parsed_response.fetch("es_cluster")).to eq(cluster.key) + end + end + + it "can return the taxonomy" do + document_params = { + "slug" => "/ministry-of-magic", + "link" => "/ministry-of-magic-site", + "title" => "Ministry of Magic", + "taxons" => %w[eb2093ef-778c-4105-9f33-9aa03d14bc5c], + } + commit_document(index, document_params) + + get "/specialist-documents-search?q=Ministry of Magict&fields[]=taxons" + expect(parsed_response.fetch("total")).to eq(1) + + taxons = parsed_response.dig("results", 0, "taxons") + expect(taxons).to eq(%w[eb2093ef-778c-4105-9f33-9aa03d14bc5c]) + end + + private + + def first_result + @first_result ||= parsed_response["results"].first + end + + def result_links + @result_links ||= parsed_response["results"].map do |result| + result["link"] + end + end + + def result_titles + @result_titles ||= parsed_response["results"].map do |result| + result["title"] + end + end + + def es_score_by_link(link) + parsed_response["results"].find { |result| result["link"] == link }["es_score"] + end +end diff --git a/spec/support/search_integration_spec_helper.rb b/spec/support/search_integration_spec_helper.rb index cd12f0c44..596ce53e2 100644 --- a/spec/support/search_integration_spec_helper.rb +++ b/spec/support/search_integration_spec_helper.rb @@ -31,93 +31,93 @@ def cma_case_attributes(attributes = {}) }.merge(attributes) end - def commit_filter_from_date_documents + def commit_filter_from_date_documents(index = "govuk_test") commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-03-30", "link" => "/old-cma-with-date"), type: "cma_case", ) commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-03-30T23:00:00.000+00:00", "link" => "/old-cma-with-datetime"), type: "cma_case", ) commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-03-31", "link" => "/matching-cma-with-date"), type: "cma_case", ) commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-03-31T00:00:00.000+00:00", "link" => "/matching-cma-with-datetime"), type: "cma_case", ) end - def commit_filter_from_time_documents + def commit_filter_from_time_documents(index = "govuk_test") commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-03-31", "link" => "/old-cma-with-date"), type: "cma_case", ) commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-03-31T13:59:59.000+00:00", "link" => "/old-cma-with-datetime"), type: "cma_case", ) commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-04-01", "link" => "/matching-cma-with-date"), type: "cma_case", ) commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-03-31T14:00:00.000+00:00", "link" => "/matching-cma-with-datetime"), type: "cma_case", ) end - def commit_filter_to_date_documents + def commit_filter_to_date_documents(index = "govuk_test") commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-04-02", "link" => "/matching-cma-with-date"), type: "cma_case", ) commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-04-02T05:00:00.000+00:00", "link" => "/matching-cma-with-datetime"), type: "cma_case", ) commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-04-03", "link" => "/future-cma-with-date"), type: "cma_case", ) commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-04-03T00:00:00.000+00:00", "link" => "/future-cma-with-datetime"), type: "cma_case", ) end - def commit_filter_to_time_documents + def commit_filter_to_time_documents(index = "govuk_test") commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-04-02", "link" => "/matching-cma-with-date"), type: "cma_case", ) commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-04-02T11:00:00.000+00:00", "link" => "/matching-cma-with-datetime"), type: "cma_case", ) commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-04-03", "link" => "/future-cma-with-date"), type: "cma_case", ) commit_document( - "govuk_test", + index, cma_case_attributes("opened_date" => "2014-04-02T11:00:01.000+00:00", "link" => "/future-cma-with-datetime"), type: "cma_case", ) diff --git a/spec/unit/index_group_spec.rb b/spec/unit/index_group_spec.rb index 949c23d4c..93529666d 100644 --- a/spec/unit/index_group_spec.rb +++ b/spec/unit/index_group_spec.rb @@ -19,7 +19,7 @@ %w[government custom], "govuk", %w[government], - SearchConfig.default_instance, + SearchConfig.default_instance ) end diff --git a/spec/unit/time_based_index_cleanup_spec.rb b/spec/unit/time_based_index_cleanup_spec.rb index b8aab8275..d25f4612a 100644 --- a/spec/unit/time_based_index_cleanup_spec.rb +++ b/spec/unit/time_based_index_cleanup_spec.rb @@ -19,7 +19,7 @@ %w[government custom], "govuk", %w[government], - SearchConfig.default_instance, + SearchConfig.default_instance ) end