Sha256: a401505c4bc55d54cd158aa28c1269f323de6b9f3c780ddd217cb5d98a06e930
Contents?: true
Size: 1.15 KB
Versions: 2
Compression:
Stored size: 1.15 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 URL: #{ActiveFedora.config.credentials[:url]}" 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 puts "Solrizer task complete." end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
solrizer-fedora-2.0.0 | lib/tasks/solrizer-fedora.rake |
solrizer-fedora-2.0.0.rc2 | lib/tasks/solrizer-fedora.rake |