From b18f25ce86f496e46294ebce6e37e42bf035c105 Mon Sep 17 00:00:00 2001 From: Laura Ghiorghisor Date: Wed, 8 Jan 2025 11:04:00 +0000 Subject: [PATCH] Changes to data ethics - remove key reference facet - change organisation facet to be array --- .../data_ethics_guidance_document.json | 125 +++++++++++++++++- config/schema/field_definitions.json | 8 +- .../presenters/elasticsearch_presenter.rb | 3 +- .../presenters/specialist_presenter.rb | 3 +- 4 files changed, 122 insertions(+), 17 deletions(-) diff --git a/config/schema/elasticsearch_types/data_ethics_guidance_document.json b/config/schema/elasticsearch_types/data_ethics_guidance_document.json index 2dbf3df8b..4f640babf 100644 --- a/config/schema/elasticsearch_types/data_ethics_guidance_document.json +++ b/config/schema/elasticsearch_types/data_ethics_guidance_document.json @@ -1,20 +1,131 @@ { "fields": [ - "data_ethics_guidance_document_key_reference", "data_ethics_guidance_document_ethical_theme", - "data_ethics_guidance_document_organisation", + "data_ethics_guidance_document_organisation_alias", "data_ethics_guidance_document_project_phase", "data_ethics_guidance_document_technology_area" ], "expanded_search_result_fields": { - "data_ethics_guidance_document_key_reference": [ + "data_ethics_guidance_document_organisation_alias": [ { - "label": "No", - "value": "no" + "label": "AI Safety Institute", + "value": "ai-safety-institute" }, { - "label": "Yes", - "value": "yes" + "label": "Analysis Standards and Pipelines Hub", + "value": "analysis-standards-and-pipelines-hub" + }, + { + "label": "Cabinet Office", + "value": "cabinet-office" + }, + { + "label": "Central Digital and Data Office", + "value": "central-digital-and-data-office" + }, + { + "label": "Crown Commercial Service", + "value": "crown-commercial-service" + }, + { + "label": "Defence Science and Technology Laboratory", + "value": "defence-science-and-technology-laboratory" + }, + { + "label": "Department for Digital, Culture, Media & Sport", + "value": "department-for-digital-culture-media-sport" + }, + { + "label": "Department for Energy, Security and Net Zero", + "value": "department-for-energy-security-and-net-zero" + }, + { + "label": "Department for Science, Innovation and Technology", + "value": "department-for-science-innovation-and-technology" + }, + { + "label": "Department of Health and Social Care", + "value": "department-of-health-and-social-care" + }, + { + "label": "Equality and Human Rights Commission", + "value": "equality-and-human-rights-commission" + }, + { + "label": "Evaluation Task Force", + "value": "evaluation-task-force" + }, + { + "label": "GCHQ", + "value": "gchq" + }, + { + "label": "Geospatial Commission", + "value": "geospatial-commission" + }, + { + "label": "Government Analysis Function", + "value": "government-analysis-function" + }, + { + "label": "Government Commercial Function", + "value": "government-commercial-function" + }, + { + "label": "Government Data Quality Hub", + "value": "government-data-quality-hub" + }, + { + "label": "Government Digital Service", + "value": "government-digital-service" + }, + { + "label": "Government Finance Function", + "value": "government-finance-function" + }, + { + "label": "Government Social Research Profession", + "value": "government-social-research-profession" + }, + { + "label": "HM Treasury", + "value": "hm-treasury" + }, + { + "label": "Information Commissioner's Office", + "value": "information-commissioners-office" + }, + { + "label": "Ministry of Defence", + "value": "ministry-of-defence" + }, + { + "label": "National Cyber Security Centre", + "value": "national-cyber-security-centre" + }, + { + "label": "NHS", + "value": "nhs" + }, + { + "label": "Office for Artificial Intelligence", + "value": "office-for-artificial-intelligence" + }, + { + "label": "Office for National Statistics", + "value": "office-for-national-statistics" + }, + { + "label": "Responsible Technology Adoption Unit", + "value": "responsible-technology-adoption-unit" + }, + { + "label": "Scottish Government", + "value": "scottish-government" + }, + { + "label": "UK Statistics Authority", + "value": "uk-statistics-authority" } ], "data_ethics_guidance_document_ethical_theme": [ diff --git a/config/schema/field_definitions.json b/config/schema/field_definitions.json index 1ad4b69ca..b48f69206 100644 --- a/config/schema/field_definitions.json +++ b/config/schema/field_definitions.json @@ -1110,15 +1110,11 @@ "type": "date" }, - - "data_ethics_guidance_document_key_reference": { - "type": "identifiers" - }, "data_ethics_guidance_document_ethical_theme": { "type": "identifiers" }, - "data_ethics_guidance_document_organisation": { - "type": "searchable_text" + "data_ethics_guidance_document_organisation_alias": { + "type": "identifiers" }, "data_ethics_guidance_document_project_phase": { "type": "identifiers" diff --git a/lib/govuk_index/presenters/elasticsearch_presenter.rb b/lib/govuk_index/presenters/elasticsearch_presenter.rb index a787e2cd6..1be5c593b 100644 --- a/lib/govuk_index/presenters/elasticsearch_presenter.rb +++ b/lib/govuk_index/presenters/elasticsearch_presenter.rb @@ -50,9 +50,8 @@ def document continuation_link: specialist.continuation_link, country: specialist.country, country_of_origin: specialist.country_of_origin, - data_ethics_guidance_document_key_reference: specialist.data_ethics_guidance_document_key_reference, data_ethics_guidance_document_ethical_theme: specialist.data_ethics_guidance_document_ethical_theme, - data_ethics_guidance_document_organisation: specialist.data_ethics_guidance_document_organisation, + data_ethics_guidance_document_organisation_alias: specialist.data_ethics_guidance_document_organisation_alias, data_ethics_guidance_document_project_phase: specialist.data_ethics_guidance_document_project_phase, data_ethics_guidance_document_technology_area: specialist.data_ethics_guidance_document_technology_area, date_application: specialist.date_application, diff --git a/lib/govuk_index/presenters/specialist_presenter.rb b/lib/govuk_index/presenters/specialist_presenter.rb index 652bfd35e..512c7e1ff 100644 --- a/lib/govuk_index/presenters/specialist_presenter.rb +++ b/lib/govuk_index/presenters/specialist_presenter.rb @@ -35,9 +35,8 @@ class SpecialistPresenter delegate_to_payload :continuation_link delegate_to_payload :country delegate_to_payload :country_of_origin - delegate_to_payload :data_ethics_guidance_document_key_reference delegate_to_payload :data_ethics_guidance_document_ethical_theme - delegate_to_payload :data_ethics_guidance_document_organisation + delegate_to_payload :data_ethics_guidance_document_organisation_alias delegate_to_payload :data_ethics_guidance_document_project_phase delegate_to_payload :data_ethics_guidance_document_technology_area delegate_to_payload :date_application