Skip to content

sul-dlss/content_search

Folders and files

NameName
Last commit message
Last commit date
Jan 24, 2025
Aug 7, 2024
Jan 24, 2025
Jan 24, 2025
Jun 12, 2024
Dec 11, 2017
Dec 11, 2017
Feb 18, 2025
Aug 7, 2024
Dec 11, 2017
Dec 11, 2017
Dec 14, 2017
Dec 11, 2017
Jun 17, 2024
Oct 24, 2022
Jun 14, 2024
Mar 25, 2020
Jan 24, 2025
Mar 31, 2025
Jul 22, 2024
Aug 5, 2018
Jan 8, 2024
Jun 1, 2021
Jan 5, 2021

Repository files navigation

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:

$ bundle exec solr_wrapper

Indexing content

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