Wrap any task with a Solr instance:
SolrWrapper.wrap do |solr|
# Something that requires Solr
end
Or with Solr and a solr collection:
subject.wrap do |solr|
solr.with_collection(dir: File.join(FIXTURES_DIR, "basic_configs")) do |collection_name|
end
end
SolrWrapper.wrap port: 8983, verbose: true, managed: true
solr.with_collection(name: 'collection_name', dir: 'path_to_solr_confiigs')