This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set up a reader and a writer | |
# First we need to require the reader/writer we want | |
require 'traject' | |
require 'traject/marc4j_reader' | |
require 'traject/debug_writer' | |
settings do | |
provide "reader_class_name", "Traject::Marc4JReader" | |
provide "marc_source.encoding", "UTF-8" | |
provide "solrj_writer.commit_on_close", "true" | |
end | |
# Log what version of jruby/java we're using | |
logger.info RUBY_DESCRIPTION | |
# index the id, title, and author | |
to_field "id", extract_marc("907a", :first => true) | |
to_field "title_display", extract_marc('245a', :first => true) | |
to_field 'title_vern_display', extract_marc('245abdefghknp', :alternate_script=>:only, :first=>true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment