diff --git a/config/govuk_index/mapped_document_types.yaml b/config/govuk_index/mapped_document_types.yaml index 6d680cb84..bc18fff9e 100644 --- a/config/govuk_index/mapped_document_types.yaml +++ b/config/govuk_index/mapped_document_types.yaml @@ -42,6 +42,7 @@ marine_equipment_approved_recommendation: marine_equipment_approved_recommendati marine_notice: marine_notice # Specialist Publisher medical_safety_alert: medical_safety_alert # Specialist Publisher ministerial_role: edition +mock_spike_finder_document: mock_spike_finder_document # Specialist Publisher news_story: edition person: person place: edition diff --git a/config/govuk_index/migrated_formats.yaml b/config/govuk_index/migrated_formats.yaml index f250f308b..c18e5f0c7 100644 --- a/config/govuk_index/migrated_formats.yaml +++ b/config/govuk_index/migrated_formats.yaml @@ -48,6 +48,7 @@ migrated: - marine_equipment_approved_recommendation - marine_notice - medical_safety_alert +- mock_spike_finder_document - product_safety_alert_report_recall - protected_food_drink_name - raib_report diff --git a/config/schema/elasticsearch_types/mock_spike_finder_document.json b/config/schema/elasticsearch_types/mock_spike_finder_document.json new file mode 100644 index 000000000..24bc5b707 --- /dev/null +++ b/config/schema/elasticsearch_types/mock_spike_finder_document.json @@ -0,0 +1,26 @@ +{ + "fields": [ + "mock_spike_finder_document_facet_one", + "mock_spike_finder_document_facet_two" + ], + "expanded_search_result_fields": { + "mock_spike_finder_document_facet_one": [ + { + "label": "Facet one value one", + "value": "facet-one-value-one" + },{ + "label": "Facet one value two", + "value": "facet-one-value-two" + } + ], + "mock_spike_finder_document_facet_two": [ + { + "label": "Facet two value one", + "value": "facet-two-value-one" + },{ + "label": "Facet two value two", + "value": "facet-two-value-two" + } + ] + } +} diff --git a/config/schema/field_definitions.json b/config/schema/field_definitions.json index 8d2214ed6..04b19c403 100644 --- a/config/schema/field_definitions.json +++ b/config/schema/field_definitions.json @@ -1104,5 +1104,12 @@ }, "veterans_support_organisation_region_wales": { "type": "identifiers" + }, + + "mock_spike_finder_document_facet_one": { + "type": "identifiers" + }, + "mock_spike_finder_document_facet_two": { + "type": "searchable_text" } } \ No newline at end of file diff --git a/config/schema/indexes/govuk.json b/config/schema/indexes/govuk.json index 471c6c73f..0b60a64e0 100644 --- a/config/schema/indexes/govuk.json +++ b/config/schema/indexes/govuk.json @@ -29,6 +29,7 @@ "marine_equipment_approved_recommendation", "marine_notice", "medical_safety_alert", + "mock_spike_finder_document", "person", "policy", "product_safety_alert_report_recall", diff --git a/lib/govuk_index/presenters/elasticsearch_presenter.rb b/lib/govuk_index/presenters/elasticsearch_presenter.rb index cf536a092..ebe815f7a 100644 --- a/lib/govuk_index/presenters/elasticsearch_presenter.rb +++ b/lib/govuk_index/presenters/elasticsearch_presenter.rb @@ -118,6 +118,8 @@ def document marine_notice_vessel_type: specialist.marine_notice_vessel_type, market_sector: specialist.market_sector, medical_specialism: specialist.medical_specialism, + mock_spike_finder_document_facet_one: specialist.mock_spike_finder_document_facet_one, + mock_spike_finder_document_facet_two: specialist.mock_spike_finder_document_facet_two, opened_date: specialist.opened_date, organisation_content_ids: expanded_links.organisation_content_ids, organisations: expanded_links.organisations, diff --git a/lib/govuk_index/presenters/specialist_presenter.rb b/lib/govuk_index/presenters/specialist_presenter.rb index 0a0c50fa7..68fc0838b 100644 --- a/lib/govuk_index/presenters/specialist_presenter.rb +++ b/lib/govuk_index/presenters/specialist_presenter.rb @@ -83,6 +83,8 @@ class SpecialistPresenter delegate_to_payload :marine_notice_vessel_type delegate_to_payload :market_sector delegate_to_payload :medical_specialism + delegate_to_payload :mock_spike_finder_document_facet_one, convert_to_array: true + delegate_to_payload :mock_spike_finder_document_facet_two delegate_to_payload :opened_date delegate_to_payload :outcome_type delegate_to_payload :payment_types