sul-dlss/content_search

Name: content_search

Owner: Stanford University Digital Library

Description: IIIF Content Search API implementation for OCR in DOR

Created: 2017-12-11 22:40:42.0

Updated: 2018-05-24 20:46:16.0

Pushed: 2018-05-22 20:30:50.0

Homepage:

Size: 216

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Build Status Coverage Status Code Climate Code Climate Test Coverage GitHub version

Content Search

Content Search provides a IIIF Content Search 0.9 API endpoint for “search-within” or “highlights-in-context” for digital object OCR.

Requirements
  1. Ruby (2.3.0 or greater)
  2. bundler gem
Installation

Clone the repository

$ git clone git@github.com:sul-dlss/content_search.git

Move into the app and install dependencies

$ cd content_search
$ bundle install

Start the development server

$ rails s
Configuring

Configuration is handled through the RailsConfig settings.yml files.

Local Configuration

The defaults in config/settings.yml should work on a locally run installation.

Testing

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
Running Solr

In a new terminal window:

ndle exec solr_wrapper
Indexing content

Content can be indexed from the Rails console:

uid = 'jg072yr3056' # e.g.
dexFullTextContentJob.perform_now(druid)

You may need to commit this separately

arch.client.commit
Updating the spellcheck database

After indexing content, you may need to ask Solr to update the spellcheck database to enable autocomplete

rl http://127.0.0.1:8983/solr/content_search/suggest?suggest.build=true

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.