Content Search provides a IIIF Content Search 0.9 API endpoint for "search-within" or "highlights-in-context" for digital object OCR.
- Ruby (2.3.0 or greater)
- bundler gem
Clone the repository
$ git clone [email protected]:sul-dlss/content_search.git
Move into the app and install dependencies
$ cd content_search
$ bundle install
Start the development server
$ rails s
Configuration is handled through the RailsConfig settings.yml
files.
The defaults in config/settings.yml
should work on a locally run installation.
The test suite (with RuboCop style enforcement) will be run with the default rake task (also run on travis)
$ bundle exec rake
The specs can be run without RuboCop style enforcement
$ bundle exec rspec
The RuboCop style enforcement can be run without running the tests
$ bundle exec rubocop
In a new terminal window:
$ bundle exec solr_wrapper
Content can be indexed from the Rails console:
> druid = 'bb034nj7139' # e.g.
> IndexFullTextContentJob.perform_now(druid)
You may need to commit this separately
> Search.client.commit