You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ability to do "advanced search" on normal search boxes had to be disabled to make adding sub-collections to collections work. This was done by removing one of the filters from the SearchBuilder model and CatalogSearchBuilder. This filter is one of the configurations found in the Blacklight Advanced Search configuration steps. We would need to add add_advanced_parse_q_to_solr back into the default processor chain. This would enable the ability to search using AND/OR in normal search boxes to help refine searches. I.E My_Title AND Some_Creator. This would be useful in the system to help disambiguate certain searches depending on how much they overlap and help people find things easier.
The error spawns from some piece of configuration not taking. In the code in Blacklight Advanced Search, it tries to find the default search field and use that to do the search. Then it checks to see if advanced search had been enabled on it. If so it does the advanced parse q in solr to refine your search. If not it just skips. Currently its not finding that default. So when it checks that advanced search has been able it has a nil value and cant make the method calls it wants to.
This is where the failure is occurring. When it calls blacklight_config.search_fields[blacklight_params[:search_field]] || blacklight_config.default_search_field both those return nil.
When it checks field_def[:advanced_parse] == false field def is a nil value so checking advanced_parse it throws a undefined method [] for nil.
I believe we would have to configure the default search field or get search fields[blacklight_params[:search_field]] to return the proper values. I was trying to get this configured in the blacklight configuration but it didn't seem like it was working. So more exploration about why those are returning nil is required.
Expected behavior
Doing searches with AND/OR in normal search boxes around Scholars Archive works and refines searches.
Descriptive summary
The ability to do "advanced search" on normal search boxes had to be disabled to make adding sub-collections to collections work. This was done by removing one of the filters from the
SearchBuilder
model andCatalogSearchBuilder
. This filter is one of the configurations found in the Blacklight Advanced Search configuration steps. We would need to addadd_advanced_parse_q_to_solr
back into the default processor chain. This would enable the ability to search using AND/OR in normal search boxes to help refine searches. I.E My_Title AND Some_Creator. This would be useful in the system to help disambiguate certain searches depending on how much they overlap and help people find things easier.The error spawns from some piece of configuration not taking. In the code in Blacklight Advanced Search, it tries to find the default search field and use that to do the search. Then it checks to see if advanced search had been enabled on it. If so it does the advanced parse q in solr to refine your search. If not it just skips. Currently its not finding that default. So when it checks that advanced search has been able it has a nil value and cant make the method calls it wants to.
https://github.com/projectblacklight/blacklight_advanced_search/blob/f3840353833cd3e8fb758485d87a3a875c052f6e/lib/blacklight_advanced_search/advanced_search_builder.rb#L54-L58
This is where the failure is occurring. When it calls
blacklight_config.search_fields[blacklight_params[:search_field]] || blacklight_config.default_search_field
both those return nil.When it checks
field_def[:advanced_parse] == false
field def is a nil value so checking advanced_parse it throws a undefined method [] for nil.I believe we would have to configure the default search field or get search fields[blacklight_params[:search_field]] to return the proper values. I was trying to get this configured in the blacklight configuration but it didn't seem like it was working. So more exploration about why those are returning nil is required.
Expected behavior
Doing searches with AND/OR in normal search boxes around Scholars Archive works and refines searches.
Actual behavior
AND/OR do not help refine searches
Related work
#2629
#2636
The text was updated successfully, but these errors were encountered: