Skip to content

Commit a7122f9

Browse files
committed
Remove component: true configuration
1 parent 699e01b commit a7122f9

1 file changed

Lines changed: 23 additions & 27 deletions

File tree

app/controllers/catalog_controller.rb

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,19 @@ class CatalogController < ApplicationController
6767
config.add_facet_field 'exploded_tag_ssim', label: 'Tag', limit: 9999,
6868
component: LazyTagFacetComponent,
6969
unless: ->(controller, _config, _response) { controller.params[:no_tags] }
70-
config.add_facet_field 'objectType_ssim', label: 'Object Type', component: true, limit: 10
71-
config.add_facet_field SolrDocument::FIELD_CONTENT_TYPE, label: 'Content Type', component: true, limit: 10
72-
config.add_facet_field 'content_file_mimetypes_ssim', label: 'MIME Types', component: true, limit: 10, home: false
73-
config.add_facet_field 'content_file_roles_ssim', label: 'File Role', component: true, limit: 10, home: false
74-
config.add_facet_field 'rights_descriptions_ssim', label: 'Access Rights', component: true, limit: 1000, sort: 'index', home: false
75-
config.add_facet_field 'use_license_machine_ssi', label: 'License', component: true, limit: 10, home: false
76-
config.add_facet_field 'nonhydrus_collection_title_ssim', label: 'Collection', component: true, limit: 10, more_limit: 9999, sort: 'index'
77-
config.add_facet_field 'hydrus_collection_title_ssim', label: 'Hydrus Collection', component: true, limit: 10, more_limit: 9999, sort: 'index', home: false
78-
config.add_facet_field 'nonhydrus_apo_title_ssim', label: 'Admin Policy', component: true, limit: 10, more_limit: 9999, sort: 'index'
79-
config.add_facet_field 'hydrus_apo_title_ssim', label: 'Hydrus Admin Policy', component: true, limit: 10, more_limit: 9999, sort: 'index', home: false
80-
config.add_facet_field SolrDocument::FIELD_CURRENT_VERSION, label: 'Version', component: true, limit: 10, home: false
81-
config.add_facet_field 'processing_status_text_ssi', label: 'Processing Status', component: true, limit: 10, home: false
82-
config.add_facet_field SolrDocument::FIELD_RELEASED_TO, label: 'Released To', component: true, limit: 10
70+
config.add_facet_field 'objectType_ssim', label: 'Object Type', limit: 10
71+
config.add_facet_field SolrDocument::FIELD_CONTENT_TYPE, label: 'Content Type', limit: 10
72+
config.add_facet_field 'content_file_mimetypes_ssim', label: 'MIME Types', limit: 10, home: false
73+
config.add_facet_field 'content_file_roles_ssim', label: 'File Role', limit: 10, home: false
74+
config.add_facet_field 'rights_descriptions_ssim', label: 'Access Rights', limit: 1000, sort: 'index', home: false
75+
config.add_facet_field 'use_license_machine_ssi', label: 'License', limit: 10, home: false
76+
config.add_facet_field 'nonhydrus_collection_title_ssim', label: 'Collection', limit: 10, more_limit: 9999, sort: 'index'
77+
config.add_facet_field 'hydrus_collection_title_ssim', label: 'Hydrus Collection', limit: 10, more_limit: 9999, sort: 'index', home: false
78+
config.add_facet_field 'nonhydrus_apo_title_ssim', label: 'Admin Policy', limit: 10, more_limit: 9999, sort: 'index'
79+
config.add_facet_field 'hydrus_apo_title_ssim', label: 'Hydrus Admin Policy', limit: 10, more_limit: 9999, sort: 'index', home: false
80+
config.add_facet_field SolrDocument::FIELD_CURRENT_VERSION, label: 'Version', limit: 10, home: false
81+
config.add_facet_field 'processing_status_text_ssi', label: 'Processing Status', limit: 10, home: false
82+
config.add_facet_field SolrDocument::FIELD_RELEASED_TO, label: 'Released To', limit: 10
8383
config.add_facet_field 'wf_wps_ssim', label: 'Workflows (WPS)',
8484
component: Blacklight::Hierarchy::FacetFieldListComponent,
8585
limit: 9999
@@ -92,14 +92,12 @@ class CatalogController < ApplicationController
9292
limit: 9999,
9393
home: false
9494
config.add_facet_field 'has_model_ssim', label: 'Object Model',
95-
component: true,
9695
limit: 10,
9796
home: false
9897

9998
## This is the costlier way to do this. Instead convert this logic to delivering new values to a new field. Then use normal add_facet_field.
10099
## For now, if you add an additional case, make sure the DOR case gets the negation.
101100
config.add_facet_field 'source', label: 'Object Source', home: false,
102-
component: true,
103101
query: {
104102
other: {
105103
label: 'DOR',
@@ -119,17 +117,15 @@ class CatalogController < ApplicationController
119117
}
120118
}
121119

122-
config.add_facet_field 'metadata_source_ssi', label: 'Metadata Source', home: false,
123-
component: true
120+
config.add_facet_field 'metadata_source_ssi', label: 'Metadata Source', home: false
124121

125122
# common method since search results and reports all do the same configuration
126123
add_common_date_facet_fields_to_config! config
127124

128125
# This will help us find records that need to be fixed before we can move to cocina.
129-
config.add_facet_field 'data_quality_ssim', label: 'Data Quality', home: false, component: true
126+
config.add_facet_field 'data_quality_ssim', label: 'Data Quality', home: false
130127

131128
config.add_facet_field 'empties', label: 'Empty Fields', home: false,
132-
component: true,
133129
query: {
134130
no_source_id: { label: 'No Source ID', fq: '-source_id_ssim:*' },
135131
no_rights_characteristics: { label: 'No Rights Characteristics', fq: '-rights_characteristics_ssim:*' },
@@ -155,14 +151,14 @@ class CatalogController < ApplicationController
155151
no_use_statement: { label: 'No Use & Reproduction Statement', fq: '-use_statement_ssim:*' }
156152
}
157153

158-
config.add_facet_field 'sw_format_ssim', label: 'SW Resource Type', component: true, limit: 10, home: false
159-
config.add_facet_field 'sw_pub_date_facet_ssi', label: 'SW Date', component: true, limit: 10, home: false
160-
config.add_facet_field 'topic_ssim', label: 'SW Topic', component: true, limit: 10, home: false
161-
config.add_facet_field 'sw_subject_geographic_ssim', label: 'SW Region', component: true, limit: 10, home: false
162-
config.add_facet_field 'sw_subject_temporal_ssim', label: 'SW Era', component: true, limit: 10, home: false
163-
config.add_facet_field 'sw_genre_ssim', label: 'SW Genre', component: true, limit: 10, home: false
164-
config.add_facet_field 'sw_language_ssim', label: 'SW Language', component: true, limit: 10, home: false
165-
config.add_facet_field 'mods_typeOfResource_ssim', label: 'MODS Resource Type', component: true, limit: 10, home: false
154+
config.add_facet_field 'sw_format_ssim', label: 'SW Resource Type', limit: 10, home: false
155+
config.add_facet_field 'sw_pub_date_facet_ssi', label: 'SW Date', limit: 10, home: false
156+
config.add_facet_field 'topic_ssim', label: 'SW Topic', limit: 10, home: false
157+
config.add_facet_field 'sw_subject_geographic_ssim', label: 'SW Region', limit: 10, home: false
158+
config.add_facet_field 'sw_subject_temporal_ssim', label: 'SW Era', limit: 10, home: false
159+
config.add_facet_field 'sw_genre_ssim', label: 'SW Genre', limit: 10, home: false
160+
config.add_facet_field 'sw_language_ssim', label: 'SW Language', limit: 10, home: false
161+
config.add_facet_field 'mods_typeOfResource_ssim', label: 'MODS Resource Type', limit: 10, home: false
166162
# Adding the facet field allows it to be queried (e.g., from value_helper)
167163
config.add_facet_field 'is_governed_by_ssim', if: false
168164
config.add_facet_field 'is_member_of_collection_ssim', if: false

0 commit comments

Comments
 (0)