Blacklight 5.10.0
Refactoring
In Blacklight 5.9, we added functionality to begin supporting search backends other than Solr. In recognition of this work, we’ve started pulling out hard-coded references to Solr where generic or Blacklight-specific terms may be more appropriate, and leaving deprecation warnings in the place of old methods and functionality. The deprecated behavior will be removed in Blacklight 6.x. Below is a table showing examples of the renaming effort:
| Blacklight 5.x | Blacklight 5.10 |
|---|---|
Blacklight::SolrHelper |
Blacklight::SearchHelper |
| solr_repository | repository |
| get_search_results | search_results |
| blacklight_solr | connection |
| solr_search_params_logic | search_params_logic |
Blacklight::Configuration#solr_document_model |
Blacklight::Configuration#document_model |
Blacklight::Configuration#solr_response_model |
Blacklight::Configuration#response_model |
Blacklight::Exceptions::InvalidSolrID |
Blacklight::Exceptions::RecordNotFound |
Blacklight::Configuration::SolrField |
Blacklight::Configuration::Field` |
Blacklight::Document#solr_response |
Blacklight::Document#response |
SearchHelper#get_solr_response_for_doc_id |
SearchHelper#fetch |
SearchHelper#get_solr_response_for_document_ids |
SearchHelper#fetch |
rake blacklight:solr:seed |
rake blacklight:index:seed |
config/solr.yml |
config/blacklight.yml |
Additional work went into creating generic versions of solr functionality, including
- The configuration file
config/solr.ymlhas been renamedconfig/blacklight.ymland the structure of the file has changed slightly to include anadapterelement. - Extracted
Blacklight::SearchBuilderfromBlacklight::SearchHelper(wasBlacklight::SolrHelper) - Extract
Blacklight::AbstractRepositoryfromBlacklight::SolrRepository - Extract
Blacklight::DocumentfromBlacklight::Solr::Document - Wrap access to RSolr in a
Blacklight::SolrRepositoryinstead of providing direct access to RSolr
We've also changed the behavior of CatalogController.search_params_logic (was .solr_search_params_logic), which defined the translation between Rails' URL parameters and the Solr request parameters. This used to call methods directly on the controller. As of Blacklight 5.10, we've added a Blacklight::SearchBuilder class to contain those methods.
Features
- Add
document_presenter_class,repository_class, andsearch_builder_classto the blacklight configuration. This configuration was previously connected with the controller. - #1115 Blacklight's index, show and facet fields should support internal keys that may be different from the field name
- #1125 Change the link for facet pagination to include the name of the facet for screen readers (e.g.
more >>tomore locations >>)
Bug Fixes
- #1082 Bookmarks should use the same
idconstraints as the primary resource - #1061 Class references in the Blacklight configuration should not be deep-duped.
- #1098 Only use the user's stored view preference if it is available
- #1127 Fix indenting for the remove icon for pivot facets (@wlayton)
- #1126 Use more granular
RSolr.solr_escapeto escape facet values
Development tools
- Extract granular generators for controllers and models from the
blacklight:installgenerator. - Extract
additional_export_formatsmethod fromcatalog#show
Upgrade Guide
After updating to Blacklight 5.10, you should expect to see many deprecation warnings. Most of them can be resolved by following the directions given in the deprecation message.