-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP - trying to add classes for the new specialist-finder index
- Loading branch information
Showing
17 changed files
with
503 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"elasticsearch_types": [ | ||
"aaib_report", | ||
"ai_assurance_portfolio_technique", | ||
"algorithmic_transparency_record", | ||
"animal_disease_case", | ||
"asylum_support_decision", | ||
"business_finance_support_scheme", | ||
"cma_case", | ||
"contact", | ||
"countryside_stewardship_grant", | ||
"drcf_digital_markets_research", | ||
"drug_safety_update", | ||
"edition", | ||
"employment_appeal_tribunal_decision", | ||
"employment_tribunal_decision", | ||
"european_structural_investment_fund", | ||
"export_health_certificate", | ||
"farming_grant", | ||
"flood_and_coastal_erosion_risk_management_research_report", | ||
"hmrc_manual", | ||
"hmrc_manual_section", | ||
"international_development_fund", | ||
"licence_transaction", | ||
"life_saving_maritime_appliance_service_station", | ||
"maib_report", | ||
"manual", | ||
"manual_section", | ||
"marine_equipment_approved_recommendation", | ||
"marine_notice", | ||
"medical_safety_alert", | ||
"person", | ||
"policy", | ||
"product_safety_alert_report_recall", | ||
"protected_food_drink_name", | ||
"raib_report", | ||
"research_for_development_output", | ||
"residential_property_tribunal_decision", | ||
"traffic_commissioner_regulatory_decision", | ||
"service_manual_guide", | ||
"service_manual_topic", | ||
"service_standard_report", | ||
"statutory_instrument", | ||
"tax_tribunal_decision", | ||
"utaac_decision", | ||
"veterans_support_organisation" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module SpecialistFinderIndex | ||
class Client < Index::Client | ||
private | ||
|
||
def index_name | ||
# rubocop:disable Naming/MemoizedInstanceVariableName | ||
@_index ||= SearchConfig.specialist_finder_index_name | ||
# rubocop:enable Naming/MemoizedInstanceVariableName | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module SpecialistFinderIndex | ||
class DocumentTypeMapper | ||
UNPUBLISHING_TYPES = %w[gone redirect substitute vanish].freeze | ||
|
||
def initialize(payload) | ||
@payload = payload | ||
end | ||
|
||
def type | ||
@payload["document_type"] | ||
end | ||
|
||
def unpublishing_type? | ||
UNPUBLISHING_TYPES.include?(@payload["document_type"]) | ||
end | ||
end | ||
end |
Oops, something went wrong.