Sha256: b44a8b34456fcf5c8361075fdf1d8c508a6ee7b1d22ba3c0e13cd34fed204b3f

Contents?: true

Size: 444 Bytes

Versions: 1

Compression:

Stored size: 444 Bytes

Contents

namespace :blacklight_oai_provider do
  # Copied index seeding task from newer versions of Blacklight
  namespace :index do
    desc "Put sample data into solr"
    task seed: [:environment] do
      require 'yaml'

      docs = YAML.safe_load(File.open(File.join(BlacklightOaiProvider.root, 'solr', 'sample_solr_documents.yml')))
      conn = RSolr.connect(Blacklight.connection_config)
      conn.add docs
      conn.commit
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blacklight_oai_provider-5.1.0 lib/railties/blacklight_oai_provider.rake