module Elos::Index::Core
Public Instance Methods
create_index(name)
click to toggle source
# File lib/elos/index/core.rb, line 15 def create_index(name) unless client.indices.exists(index: name) client.indices.create(index: name, body: index_parameters) end end
delete_index(name)
click to toggle source
# File lib/elos/index/core.rb, line 21 def delete_index(name) if client.indices.exists(index: name) client.indices.delete(index: name) end end
index_parameters()
click to toggle source
# File lib/elos/index/core.rb, line 31 def index_parameters { settings: Elos.settings, mappings: mappings } end
refresh_index(name)
click to toggle source
# File lib/elos/index/core.rb, line 27 def refresh_index(name) client.indices.refresh(index: name) end