SolrmarcWrapper

<img src=“https://travis-ci.org/sul-dlss/solrmarc_wrapper.svg” alt=“Build Status” /> <img src=“https://badge.fury.io/rb/solrmarc_wrapper.svg” alt=“Gem Version” />

Ruby wrapper for accessing SolrMarc and Solr objects, such as using org.solrmarc.marc.SolrReIndexer to get a SolrInputDocument from a marc record stored in the Solr index.

Installation

Add this line to your application’s Gemfile:

gem 'solrmarc_wrapper'

And then execute:

$ bundle

Or install it yourself as:

$ gem install solrmarc_wrapper

Usage

This gem must be run under JRuby, and also requires a solrmarc dist directory and solr url (see config/settings.yml)

Example: this retrieves the full marc record stored in the Solr index, runs it through SolrMarc indexing to get a SolrInputDocument from the marcxml. It current identifies Solr documents by the Solr “id” field, and expects the marc to be stored in a Solr field “marcxml” (this will be configurable in a future version).

def solr_input_doc(id)
  @solrmarc_wrapper.get_solr_input_doc_from_marcxml(id)
end

Contributing

See also the wiki page for committers: github.com/sul-dlss/solrmarc_wrapper/wiki/For-Committers

  1. Fork it

  2. Create your feature branch (‘git checkout -b my-new-feature`)

  3. Commit your changes (‘git commit -am ’Added some feature’‘)

  4. Push to the branch (‘git push origin my-new-feature`)

  5. Create new Pull Request