diff --git a/VERSION b/VERSION index 4a36342f..cb2b00e4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0 +3.0.1 diff --git a/lib/trln_argon/argon_search_builder/subjects_boost.rb b/lib/trln_argon/argon_search_builder/subjects_boost.rb index 9e898dc6..0e177a22 100644 --- a/lib/trln_argon/argon_search_builder/subjects_boost.rb +++ b/lib/trln_argon/argon_search_builder/subjects_boost.rb @@ -56,8 +56,7 @@ def advanced_search_title_boost def includes_subject_search? blacklight_params.key?('search_field') && - ((blacklight_params['search_field'] == 'subject' || - blacklight_params['search_field'] == 'genre_headings') || + (['subject', 'genre_headings'].include?(blacklight_params['search_field']) || (blacklight_params['search_field'] == 'advanced' && blacklight_params.fetch('subject', nil).present?)) end diff --git a/lib/trln_argon/solr_document.rb b/lib/trln_argon/solr_document.rb index 3ed12bd6..c90e8a9a 100644 --- a/lib/trln_argon/solr_document.rb +++ b/lib/trln_argon/solr_document.rb @@ -90,7 +90,8 @@ def names_to_text end def creators_to_text - names.select { |n| n[:type] == 'creator' || n[:type] == 'director' || n[:type] == 'no_rel' || n[:type] == '' } + valid_types = ['creator', 'director', 'no_rel', ''] + names.select { |n| valid_types.include?(n[:type]) } .map { |n| n[:name] }.reject(&:empty?) end