Skip to content

Commit

Permalink
Revert "[#4597] Add back all languages to facets on the advanced sear…
Browse files Browse the repository at this point in the history
…ch form"

It caused serious performance issues on staging.  Looking at the original,
we only need to set the facet limit to -1 for languages, not the other facets.

This reverts commit 12e367b.
sandbergja committed Dec 11, 2024
1 parent 71fb947 commit 8a06540
Showing 5 changed files with 6 additions and 51 deletions.
2 changes: 0 additions & 2 deletions .reek.yml
Original file line number Diff line number Diff line change
@@ -395,7 +395,6 @@ detectors:
- BookmarksController
- CatalogController
- Orangelight::Catalog
- Orangelight::ExcessivePaging
- Orangelight::Stackmap
- ContactController
- ErrorsController
@@ -909,7 +908,6 @@ detectors:
- Requests::RequestHelper#pul_patron_name
- Requests::RequestHelper#request_title
- Requests::RequestMailer#annex_items
- AdvancedFormSearchBuilder#do_not_limit_facets
- Bookmark#alma_id?
- Bookmark#special_system_id?
- Blacklight::Document::Email#add_online_text
12 changes: 4 additions & 8 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
@@ -841,16 +841,12 @@ def basic_response
end

def search_service_context
if %w[advanced_search numismatics].include? action_name
{ search_builder_class: AdvancedFormSearchBuilder }
else
return {} unless Flipflop.multi_algorithm?
return {} unless configurable_search_builder_class # use default if none specified
{ search_builder_class: configurable_search_builder_class }
end
return {} unless Flipflop.multi_algorithm?
return {} unless alternate_search_builder_class # use default if none specified
{ search_builder_class: alternate_search_builder_class }
end

def configurable_search_builder_class
def alternate_search_builder_class
return unless search_algorithm_param && allowed_search_algorithms.include?(search_algorithm_param)

"#{search_algorithm_param}_search_builder".camelize.constantize
16 changes: 0 additions & 16 deletions app/models/advanced_form_search_builder.rb

This file was deleted.

25 changes: 0 additions & 25 deletions spec/models/advanced_form_search_builder_spec.rb

This file was deleted.

2 changes: 2 additions & 0 deletions spec/views/catalog/advanced_search.html.erb_spec.rb
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
visit '/advanced'
end
it 'has the full list of languages' do
pending('Resolving https://github.com/pulibrary/orangelight/issues/4597')
within '#language_facet-list' do
language_list_elements = page.find_all('li')
expect(language_list_elements.size).to be > 10
@@ -28,6 +29,7 @@
visit '/advanced?q=a&search_field=all_fields'
end
it 'has the full list of languages' do
pending('Resolving https://github.com/pulibrary/orangelight/issues/4597')
within '#language_facet-list' do
language_list_elements = page.find_all('li')
expect(language_list_elements.size).to be > 10

0 comments on commit 8a06540

Please sign in to comment.