Skip to content

Commit 0304f08

Browse files
committed
Removing specialist finder specific fields from Govuk Index presenters
1 parent 0513977 commit 0304f08

File tree

2 files changed

+0
-318
lines changed

2 files changed

+0
-318
lines changed

Diff for: lib/govuk_index/presenters/elasticsearch_presenter.rb

-151
Original file line numberDiff line numberDiff line change
@@ -13,200 +13,53 @@ def type
1313

1414
def document
1515
{
16-
ai_assurance_technique: specialist.ai_assurance_technique,
17-
aircraft_category: specialist.aircraft_category,
18-
aircraft_type: specialist.aircraft_type,
19-
alert_type: specialist.alert_type,
20-
algorithmic_transparency_record_atrs_version: specialist.algorithmic_transparency_record_atrs_version,
21-
algorithmic_transparency_record_capability: specialist.algorithmic_transparency_record_capability,
22-
algorithmic_transparency_record_date_published: specialist.algorithmic_transparency_record_date_published,
23-
algorithmic_transparency_record_function: specialist.algorithmic_transparency_record_function,
24-
algorithmic_transparency_record_organisation: specialist.algorithmic_transparency_record_organisation,
25-
algorithmic_transparency_record_organisation_type: specialist.algorithmic_transparency_record_organisation_type,
26-
algorithmic_transparency_record_other_tags: specialist.algorithmic_transparency_record_other_tags,
27-
algorithmic_transparency_record_phase: specialist.algorithmic_transparency_record_phase,
28-
algorithmic_transparency_record_region: specialist.algorithmic_transparency_record_region,
29-
algorithmic_transparency_record_task: specialist.algorithmic_transparency_record_task,
30-
areas_of_interest: specialist.areas_of_interest,
31-
assessment_date: specialist.assessment_date,
32-
assurance_technique_approach: specialist.assurance_technique_approach,
3316
attachments: common_fields.attachments,
34-
authors: specialist.authors,
35-
business_sizes: specialist.business_sizes,
36-
business_stages: specialist.business_stages,
37-
case_state: specialist.case_state,
38-
case_type: specialist.case_type,
39-
category: specialist.category,
40-
certificate_status: specialist.certificate_status,
41-
class_category: specialist.class_category,
42-
closed_date: specialist.closed_date,
43-
closing_date: specialist.closing_date,
44-
commodity_type: specialist.commodity_type,
4517
contact_groups: details.contact_groups,
4618
content_id: common_fields.content_id,
4719
content_purpose_subgroup: common_fields.content_purpose_subgroup,
4820
content_purpose_supergroup: common_fields.content_purpose_supergroup,
4921
content_store_document_type: common_fields.content_store_document_type,
50-
continuation_link: specialist.continuation_link,
51-
country: specialist.country,
52-
country_of_origin: specialist.country_of_origin,
53-
date_application: specialist.date_application,
54-
date_of_completion: specialist.date_of_completion,
55-
date_of_occurrence: specialist.date_of_occurrence,
56-
date_of_start: specialist.date_of_start,
57-
date_registration: specialist.date_registration,
58-
date_registration_eu: specialist.date_registration_eu,
59-
decision_subject: specialist.decision_subject,
6022
description: common_fields.description,
61-
destination_country: specialist.destination_country,
62-
development_sector: specialist.development_sector,
63-
digital_market_research_area: specialist.digital_market_research_area,
64-
digital_market_research_category: specialist.digital_market_research_category,
65-
digital_market_research_publish_date: specialist.digital_market_research_publish_date,
66-
digital_market_research_publisher: specialist.digital_market_research_publisher,
67-
digital_market_research_topic: specialist.digital_market_research_topic,
68-
disease_case_closed_date: specialist.disease_case_closed_date,
69-
disease_case_opened_date: specialist.disease_case_opened_date,
70-
disease_type: specialist.disease_type,
7123
document_type: type,
72-
eligible_entities: specialist.eligible_entities,
7324
email_document_supertype: common_fields.email_document_supertype,
74-
first_published_at: specialist.first_published_at,
75-
flood_and_coastal_erosion_category: specialist.flood_and_coastal_erosion_category,
7625
format: common_fields.format,
77-
fund_state: specialist.fund_state,
78-
fund_type: specialist.fund_type,
79-
funding_amount: specialist.funding_amount,
80-
funding_source: specialist.funding_source,
8126
government_document_supertype: common_fields.government_document_supertype,
8227
government_name: common_fields.government_name,
83-
grant_type: specialist.grant_type,
84-
hidden_indexable_content: specialist.hidden_indexable_content,
8528
hmrc_manual_section_id: common_fields.section_id,
8629
image_url:,
8730
indexable_content: indexable.indexable_content,
88-
industries: specialist.industries,
89-
internal_notes: specialist.internal_notes,
9031
is_historic: common_fields.historic?,
9132
is_political: common_fields.political?,
9233
is_withdrawn: common_fields.withdrawn?,
93-
issued_date: specialist.issued_date,
94-
keyword: specialist.keyword,
95-
key_function: specialist.key_function,
96-
laid_date: specialist.laid_date,
97-
land_use: specialist.land_use,
98-
land_types: specialist.land_types,
9934
latest_change_note: details.latest_change_note,
10035
licence_identifier: details.licence_identifier,
101-
licence_transaction_continuation_link: specialist.licence_transaction_continuation_link,
102-
licence_transaction_industry: specialist.licence_transaction_industry,
103-
licence_transaction_licence_identifier: specialist.licence_transaction_licence_identifier,
104-
licence_transaction_location: specialist.licence_transaction_location,
105-
licence_transaction_will_continue_on: specialist.licence_transaction_will_continue_on,
10636
licence_short_description: details.licence_short_description,
107-
life_saving_maritime_appliance_service_station_regions: specialist.life_saving_maritime_appliance_service_station_regions,
108-
life_saving_maritime_appliance_type: specialist.life_saving_maritime_appliance_type,
109-
life_saving_maritime_appliance_manufacturer: specialist.life_saving_maritime_appliance_manufacturer,
11037
link: common_fields.link,
111-
location: specialist.location,
11238
mainstream_browse_page_content_ids: expanded_links.mainstream_browse_page_content_ids,
11339
mainstream_browse_pages: expanded_links.mainstream_browse_pages,
11440
manual: details.parent_manual,
115-
marine_notice_topic: specialist.marine_notice_topic,
116-
marine_notice_type: specialist.marine_notice_type,
117-
marine_notice_vessel_type: specialist.marine_notice_vessel_type,
118-
market_sector: specialist.market_sector,
119-
medical_specialism: specialist.medical_specialism,
120-
opened_date: specialist.opened_date,
12141
organisation_content_ids: expanded_links.organisation_content_ids,
12242
organisations: expanded_links.organisations,
123-
outcome_type: specialist.outcome_type,
12443
part_of_taxonomy_tree: expanded_links.part_of_taxonomy_tree,
12544
parts: parts.presented_parts,
126-
payment_types: specialist.payment_types,
12745
people: expanded_links.people,
12846
policy_groups: expanded_links.policy_groups,
12947
popularity: common_fields.popularity,
13048
popularity_b: common_fields.popularity_b,
13149
primary_publishing_organisation: expanded_links.primary_publishing_organisation,
132-
principle: specialist.principle,
133-
product_alert_type: specialist.product_alert_type,
134-
product_category: specialist.product_category,
135-
product_measure_type: specialist.product_measure_type,
136-
product_recall_alert_date: specialist.product_recall_alert_date,
137-
product_risk_level: specialist.product_risk_level,
138-
project_code: specialist.project_code,
139-
project_status: specialist.project_status,
140-
protection_type: specialist.protection_type,
14150
public_timestamp: common_fields.public_timestamp,
14251
publishing_app: common_fields.publishing_app,
143-
railway_type: specialist.railway_type,
144-
reason_for_protection: specialist.reason_for_protection,
145-
reference_number: specialist.reference_number,
146-
regions: specialist.regions,
147-
register: specialist.register,
148-
registered_name: specialist.registered_name,
149-
registration: specialist.registration,
15052
rendering_app: common_fields.rendering_app,
151-
report_type: specialist.report_type,
152-
research_document_type: specialist.research_document_type,
153-
result: specialist.result,
154-
review_status: specialist.review_status,
15553
role_appointments: expanded_links.role_appointments,
15654
roles: expanded_links.roles,
157-
sector: specialist.sector,
158-
service_provider: specialist.service_provider,
159-
sift_end_date: specialist.sift_end_date,
160-
sifting_status: specialist.sifting_status,
16155
slug:,
162-
stage: specialist.stage,
163-
status: specialist.status,
164-
subject: specialist.subject,
16556
taxons: expanded_links.taxons,
166-
theme: specialist.theme,
167-
therapeutic_area: specialist.therapeutic_area,
168-
tiers_or_standalone_items: specialist.tiers_or_standalone_items,
169-
time_registration: specialist.time_registration,
17057
title: common_fields.title,
17158
topical_events: expanded_links.topical_events,
172-
topics: specialist.topics,
173-
traditional_term_grapevine_product_category: specialist.traditional_term_grapevine_product_category,
174-
traditional_term_language: specialist.traditional_term_language,
175-
traditional_term_type: specialist.traditional_term_type,
176-
tribunal_decision_categories: specialist.tribunal_decision_categories,
177-
tribunal_decision_category: specialist.tribunal_decision_category,
178-
tribunal_decision_country: specialist.tribunal_decision_country,
179-
tribunal_decision_decision_date: specialist.tribunal_decision_decision_date,
180-
tribunal_decision_judges: specialist.tribunal_decision_judges,
181-
tribunal_decision_landmark: specialist.tribunal_decision_landmark,
182-
tribunal_decision_reference_number: specialist.tribunal_decision_reference_number,
183-
tribunal_decision_sub_categories: specialist.tribunal_decision_sub_categories,
184-
tribunal_decision_sub_category: specialist.tribunal_decision_sub_category,
185-
types_of_support: specialist.types_of_support,
18659
updated_at: common_fields.updated_at,
187-
use_case: specialist.use_case,
18860
user_journey_document_supertype: common_fields.user_journey_document_supertype,
189-
value_of_funding: specialist.value_of_funding,
190-
vessel_type: specialist.vessel_type,
191-
veterans_support_organisation_health_and_social_care: specialist.veterans_support_organisation_health_and_social_care,
192-
veterans_support_organisation_finance: specialist.veterans_support_organisation_finance,
193-
veterans_support_organisation_legal_and_justice: specialist.veterans_support_organisation_legal_and_justice,
194-
veterans_support_organisation_employment_education_and_training: specialist.veterans_support_organisation_employment_education_and_training,
195-
veterans_support_organisation_housing: specialist.veterans_support_organisation_housing,
196-
veterans_support_organisation_families_and_children: specialist.veterans_support_organisation_families_and_children,
197-
veterans_support_organisation_community_and_social: specialist.veterans_support_organisation_community_and_social,
198-
veterans_support_organisation_region_england: specialist.veterans_support_organisation_region_england,
199-
veterans_support_organisation_region_northern_ireland: specialist.veterans_support_organisation_region_northern_ireland,
200-
veterans_support_organisation_region_scotland: specialist.veterans_support_organisation_region_scotland,
201-
veterans_support_organisation_region_wales: specialist.veterans_support_organisation_region_wales,
20261
view_count: common_fields.view_count,
203-
virus_strain: specialist.virus_strain,
204-
will_continue_on: specialist.will_continue_on,
205-
withdrawn_date: specialist.withdrawn_date,
20662
world_locations: expanded_links.world_locations,
207-
year_adopted: specialist.year_adopted,
208-
zone_restriction: specialist.zone_restriction,
209-
zone_type: specialist.zone_type,
21063
}.reject { |_, v| v.nil? }
21164
end
21265

@@ -283,10 +136,6 @@ def expanded_links
283136
@expanded_links ||= ExpandedLinksPresenter.new(payload["expanded_links"])
284137
end
285138

286-
def specialist
287-
@specialist ||= SpecialistPresenter.new(payload)
288-
end
289-
290139
def newslike?
291140
return false if common_fields.content_store_document_type == "fatality_notice"
292141

0 commit comments

Comments
 (0)