Sha256: 5abb4ff2e60165b9d192441eb63f319baefebd7790a9e28ae7f0b6d96f786699

Contents?: true

Size: 438 Bytes

Versions: 3

Compression:

Stored size: 438 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.solr_config)
      conn.add docs
      conn.commit
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blacklight_oai_provider-5.0.0 lib/railties/blacklight_oai_provider.rake
blacklight_oai_provider-5.0.0.pre1 lib/railties/blacklight_oai_provider.rake
blacklight_oai_provider-4.1.0 lib/railties/blacklight_oai_provider.rake