diff options
author | 2017-05-23 11:18:01 -0700 | |
---|---|---|
committer | 2017-05-23 11:18:01 -0700 | |
commit | 0568b5cc657975d460ac4eaea73736eb13ff4696 (patch) | |
tree | c27c40e5d3bec2e3794316f979b29b5bfde51e63 /lib | |
parent | More function name mismatch (diff) | |
download | backend-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.rb | 6 |
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( |