Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we remove blacklight_advanced_search as a dependency? #2579

Open
corylown opened this issue Sep 25, 2024 · 1 comment
Open

Can we remove blacklight_advanced_search as a dependency? #2579

corylown opened this issue Sep 25, 2024 · 1 comment

Comments

@corylown
Copy link
Contributor

The Blacklight Advanced Search gem was added to support Boolean searching as a workaround for a Solr issue, see: #322

We've since updated to newer versions of Solr and switched to the edismax query parser, which supports Boolean operators. We might have to fiddle with the mm settings as we did in DLME: https://github.com/sul-dlss/dlme/blob/main/app/models/search_builder.rb#L21-L32

I do not think we are using any other features of the advanced search gem in exhibits.

@cbeer
Copy link
Member

cbeer commented Sep 26, 2024

Unfortunately, the edismax notion of boolean operators doesn't align well with user expectations and there's a handful of browse categories (like 100) that probably break without adv search's query parsing, especially the ones that mix boolean operators:

 {"q"=>"virgin OR madonna AND child", "search_field"=>"search"}
 {"search_field"=>"search", "q"=>"europe AND street OR opening"},

These are probably the problematic ones:
Spotlight::Search.pluck(:query_params).select { |x| x && x['q'] && x['q'] =~ / (NOT|AND|OR) /i }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants