Sha256: 34187adb84446c65ff43e4924bc0cd6527ef44942c77ca4604a29ba9544e9a73
Contents?: true
Size: 1.12 KB
Versions: 6
Compression:
Stored size: 1.12 KB
Contents
namespace :solrizer do desc 'Index a fedora object of the given pid.' task :solrize => :environment do index_full_text = ENV['FULL_TEXT'] == 'true' if ENV['PID'] puts "indexing #{ENV['PID'].inspect}" solrizer = Solrizer::Solrizer.new :index_full_text=> index_full_text solrizer.solrize(ENV['PID']) puts "Finished shelving #{ENV['PID']}" else puts "You must provide a pid using the format 'solrizer::solrize_object PID=sample:pid'." end end desc 'Index all objects in the repository.' task :solrize_objects => :environment do index_full_text = ENV['FULL_TEXT'] == 'true' if ENV['INDEX_LIST'] @@index_list = ENV['INDEX_LIST'] end puts "Re-indexing Fedora Repository." puts "Fedora URL: #{ActiveFedora.fedora_config[:url]}" puts "Fedora Solr URL: #{ActiveFedora.solr_config[:url]}" puts "Blacklight Solr Config: #{Blacklight.solr_config.inspect}" puts "Doing full text index." if index_full_text solrizer = Solrizer::Solrizer.new :index_full_text=> index_full_text solrizer.solrize_objects puts "Solrizer task complete." end end
Version data entries
6 entries across 6 versions & 1 rubygems