From 26dc627842a0e0fa93c16a3720a3daee7bfdd440 Mon Sep 17 00:00:00 2001 From: Dan Olson Date: Fri, 30 Aug 2024 20:23:56 -0400 Subject: [PATCH] Reenable transcript search This feature was disabled a while ago, but is ready to return --- app/controllers/advanced_controller.rb | 2 +- app/controllers/catalog_controller.rb | 16 ++++++++-------- spec/features/advanced_search_spec.rb | 3 +-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/app/controllers/advanced_controller.rb b/app/controllers/advanced_controller.rb index c6c53edf..ed5a29ee 100644 --- a/app/controllers/advanced_controller.rb +++ b/app/controllers/advanced_controller.rb @@ -70,7 +70,7 @@ def index ### # Temporarily excluded from advanced search. Remove # next line to re-enable the transcript search input - field.include_in_advanced_search = false + # field.include_in_advanced_search = false field.solr_parameters = { :'spellcheck.dictionary' => 'default' } field.solr_local_parameters = { qf: '$transcription_qf', diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index 98bd5c30..9feb60cf 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -461,14 +461,14 @@ def parse_referrer_pagination_params(query_string) # when the advanced search form is submitted. # # Commenting out transcript until we have a good plan for transcript search results - PKS - #config.add_search_field('transcript') do |field| - # field.include_in_simple_search = false - # field.solr_parameters = { :'spellcheck.dictionary' => 'default' } - # field.solr_local_parameters = { - # qf: '$transcription_qf', - # pf: '$transcription_pf' - # } - #end + config.add_search_field('transcript') do |field| + field.include_in_simple_search = false + field.solr_parameters = { :'spellcheck.dictionary' => 'default' } + field.solr_local_parameters = { + qf: '$transcription_qf', + pf: '$transcription_pf' + } + end config.add_search_field('description') do |field| field.include_in_simple_search = false field.solr_parameters = { :'spellcheck.dictionary' => 'default' } diff --git a/spec/features/advanced_search_spec.rb b/spec/features/advanced_search_spec.rb index 23898392..80404aea 100644 --- a/spec/features/advanced_search_spec.rb +++ b/spec/features/advanced_search_spec.rb @@ -5,8 +5,7 @@ solr_fixtures('sll:22470', 'otter:297', 'msn:2277', 'msn:2670', 'msn:2680') end - xit 'can find a record by text contained in its transcript' do - pending 'Transcript is temporarily excluded from advanced search' + it 'can find a record by text contained in its transcript' do visit '/' click_link 'Advanced Search' fill_in 'Transcript', with: '"fifty percent cut"'