diff --git a/lib/tasks/elasticsearch_batch_op.rake b/lib/tasks/elasticsearch_batch_op.rake new file mode 100644 index 000000000..fb2c638bc --- /dev/null +++ b/lib/tasks/elasticsearch_batch_op.rake @@ -0,0 +1,31 @@ +namespace :importer do + task :importuser do + ENV['CLASS']='User' + ENV['SCOPE']='indexable' + ENV['FORCE']='y' + ENV['BATCH']='1000' + Rake::Task["elasticsearch:import:model"].invoke + end + task :importproject do + + ENV['CLASS']='Project' + ENV['SCOPE']='indexable' + ENV['FORCE']='y' + ENV['BATCH']='1000' + Rake::Task["elasticsearch:import:model"].invoke + end + task :importcourse do + ENV['CLASS']='Course' + ENV['SCOPE']='indexable' + ENV['FORCE']='y' + ENV['BATCH']='1000' + Rake::Task["elasticsearch:import:model"].invoke + end + task :importattachment do + ENV['CLASS']='Attachment' + ENV['SCOPE']='indexable' + ENV['FORCE']='y' + ENV['BATCH']='1000' + Rake::Task["elasticsearch:import:model"].invoke + end +end \ No newline at end of file