Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mock finder #2974

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/govuk_index/mapped_document_types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions config/govuk_index/migrated_formats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 26 additions & 0 deletions config/schema/elasticsearch_types/mock_spike_finder_document.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
}
7 changes: 7 additions & 0 deletions config/schema/field_definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
1 change: 1 addition & 0 deletions config/schema/indexes/govuk.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"marine_equipment_approved_recommendation",
"marine_notice",
"medical_safety_alert",
"mock_spike_finder_document",
"person",
"policy",
"product_safety_alert_report_recall",
Expand Down
2 changes: 2 additions & 0 deletions lib/govuk_index/presenters/elasticsearch_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions lib/govuk_index/presenters/specialist_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading