module SearchEnjoy::Indexing::ClassMethods
Class methods and variables for indexing
Attributes
search_index[RW]
Public Instance Methods
create_index!()
click to toggle source
# File lib/search_enjoy/indexing.rb, line 20 def create_index! raise IndexException, 'Index already exist' unless @search_index.nil? @search_index = SearchIndex.new(index_schema: @index_schema) @search_index_state = {} initialize_dump_counter rescue StandardError => e e.message end
delete_index!()
click to toggle source
# File lib/search_enjoy/indexing.rb, line 31 def delete_index! raise IndexException, "Index doesn't exist" if @search_index.nil? @search_index = nil rescue StandardError => e e.message end
recreate_index!()
click to toggle source
# File lib/search_enjoy/indexing.rb, line 39 def recreate_index! delete_index! create_index! end