aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2017-05-23 11:18:01 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2017-05-23 11:18:01 -0700
commit0568b5cc657975d460ac4eaea73736eb13ff4696 (patch)
treec27c40e5d3bec2e3794316f979b29b5bfde51e63 /lib
parentMore function name mismatch (diff)
downloadbackend-0568b5cc657975d460ac4eaea73736eb13ff4696.tar.gz
backend-0568b5cc657975d460ac4eaea73736eb13ff4696.tar.bz2
backend-0568b5cc657975d460ac4eaea73736eb13ff4696.zip
ag: allow manual flush of index.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/storage.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/storage.rb b/lib/storage.rb
index daa1d1b..304c6e2 100644
--- a/lib/storage.rb
+++ b/lib/storage.rb
@@ -286,6 +286,12 @@ module Ag::Storage
_hide_unhide(list, id, false, comment)
end
+ def flush_index(list)
+ $es.indices.flush(
+ :index: index_name(list),
+ )
+ end
+
def update(list, id, doc_changes)
raise "Invalid update for #{list}/#{id} #{doc_changes}" unless doc_changes.is_a?(Hash)
$es.update(