aboutsummaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorMax Magorsch <arzano@gentoo.org>2020-02-12 23:21:30 +0100
committerMax Magorsch <arzano@gentoo.org>2020-02-12 23:21:30 +0100
commit6643292badd88e68256f3a6b9f23cc65f82b417e (patch)
treeb07c5cb7a72044504d6a2109d95623d95b8d52e5 /lib/tasks
parentviews: rip out Piwik (diff)
downloadpackages-5-6643292badd88e68256f3a6b9f23cc65f82b417e.tar.gz
packages-5-6643292badd88e68256f3a6b9f23cc65f82b417e.tar.bz2
packages-5-6643292badd88e68256f3a6b9f23cc65f82b417e.zip
Don't recreate the ES-index by default
By default the ES index will only be created now if it is not alredy present. In case it is already present it won't be recreated when using the kkuleomi:index:init task. To forcefully recreate the index, kkuleomi:index:recreate can be used. Signed-off-by: Max Magorsch <arzano@gentoo.org>
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/kkuleomi.rake4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/tasks/kkuleomi.rake b/lib/tasks/kkuleomi.rake
index 9362b7a..45d9283 100644
--- a/lib/tasks/kkuleomi.rake
+++ b/lib/tasks/kkuleomi.rake
@@ -2,6 +2,10 @@ namespace :kkuleomi do
namespace :index do
desc '(Re-)Initializes the ElasticSearch index'
task init: :environment do
+ Kkuleomi::Store.create_index false
+ end
+
+ task recreate: :environment do
Kkuleomi::Store.create_index true
end
end