GeoBlacklight 1.0 Upgrade Guide

Jack Reed edited this page Aug 3, 2016 · 15 revisions

Blacklight 6 upgrades

Update Routes

Make sure you update your routes to use the new Blacklight 6 format. GeoBlacklight has also been updated to use a similar format.

https://github.com/sul-dlss/earthworks/pull/308/commits/7ad23ba1e4b73e7320066dec6e0417f108d513a4

You will probably need to update the names of several of the Blacklight routes. Some of them now use named paths.

https://github.com/sul-dlss/earthworks/pull/308/commits/b71543f2133a7dd3d19472c48d7e5005c0e9d290

Also see: https://github.com/projectblacklight/blacklight/releases/tag/v6.0.0 "Routing Changes"

Add rsolr to Gemfile

Blacklight now requires this to be specified in a consuming application's Gemfile

https://github.com/sul-dlss/earthworks/pull/308/commits/e8eec4303fef23a16a0f8e956108fe2d4b3f714f

GeoBlacklight updates

Update SearchBuilder

If you previously subclassed or created your own SearchBuilder, you may need to change that. If not, you should be ok.

https://github.com/sul-dlss/earthworks/pull/308/commits/b8facebb67acc4d23ec7fc319b9c0c544ce76edc

Add updated settings to file

New settings have been added to the GeoBlacklight settings.yml file. New settings include:

  • metadata fields can now be set and customized
  • Options for the Leaflet map can now be applied via settings

https://github.com/sul-dlss/earthworks/pull/308/commits/df7144c1391b7c80eb7b5c2f8a03088da1617f64

Update geoblacklight.js

Make sure your application's geoblacklight.js file requires all the needed modules:

see: https://github.com/geoblacklight/geoblacklight/blob/master/lib/generators/geoblacklight/templates/geoblacklight.js

//= require geoblacklight/geoblacklight
//= require geoblacklight/basemaps
//= require geoblacklight/controls
//= require geoblacklight/viewers
//= require geoblacklight/modules
//= require geoblacklight/downloaders
//= require leaflet-iiif
//= require esri-leaflet
//= require readmore.min

Updating CatalogController

Update your catalog_controller.rb file to:

  • Use the Geoblacklight::DocumentPresenter
config.index.document_presenter_class = Geoblacklight::DocumentPresenter
  • Use the newly configured Solr fields from the settings.yml file (optional).
  • Use the autocomplete feature from Blacklight
    # Configuration for autocomplete suggestor
    config.autocomplete_enabled = true
    config.autocomplete_path = 'suggest'

Schema updates

The Solr schema.xml file now uses layer_slug_s as the primary key for the index. Since we deprecated the uuid field in the schema, we recommend rebuilding your Solr index with the latest schema.xml configuration.

You can’t perform that action at this time.
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.
Press h to open a hovercard with more details.