Skip to content

Commit 900a402

Browse files
author
LaRita Robinson
committed
Fix snippets
1 parent 9927378 commit 900a402

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

app/controllers/catalog_controller_decorator.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,14 @@ def self.uploaded_field
4444
config.add_facet_field 'member_of_collections_ssim', limit: 5, label: 'Collections'
4545
config.add_facet_field 'account_institution_name_ssim', label: 'Institution', limit: 5
4646

47-
config.index_fields.clear
47+
# keep iiif_print index fields from Hyku so we don't have to redefine snippets logic
48+
config.index_fields.keys.each do |key|
49+
next if key == 'all_text_timv'
50+
next if key == 'all_text_tsimv'
51+
52+
config.index_fields.delete(key)
53+
end
4854
config.add_index_field 'based_near_label_tesim', itemprop: 'contentLocation', link_to_facet: 'based_near_label_sim'
49-
config.add_index_field 'all_text_tsimv', highlight: true, helper_method: :render_ocr_snippets
5055
config.add_index_field solr_name("title", :stored_searchable), label: "Title", itemprop: 'name', if: false
5156
config.add_index_field solr_name("creator", :stored_searchable), itemprop: 'creator', link_to_search: solr_name("creator", :facetable)
5257
config.add_index_field solr_name("date", :stored_searchable), itemprop: 'date'
@@ -160,7 +165,7 @@ def self.uploaded_field
160165
all_names = config.show_fields.values.map(&:field).join(" ")
161166
title_name = 'title_tesim'
162167
field.solr_parameters = {
163-
qf: "#{all_names} file_format_tesim all_text_timv",
168+
qf: "#{all_names} file_format_tesim all_text_timv all_text_tsimv",
164169
pf: title_name.to_s
165170
}
166171
end

0 commit comments

Comments
 (0)