Sha256: f3090951d6a7e0e0c783150462b470f1a8687a4edbe7d98e60eb56f168af8823
Contents?: true
Size: 1.11 KB
Versions: 4
Compression:
Stored size: 1.11 KB
Contents
namespace :solrizer do namespace :fedora 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::Fedora::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 Solr URL: #{ActiveFedora.solr_config[:url]}" puts "Doing full text index." if index_full_text solrizer = Solrizer::Fedora::Solrizer.new :index_full_text=> index_full_text solrizer.solrize_objects :suppress_errors=>true puts "Solrizer task complete." end end end
Version data entries
4 entries across 4 versions & 1 rubygems