app/models/concerns/indexable.rb
# don't raise an exception when not found
don't raise an exception when not found
don ' t raise an exception when not found
def recreate_index(options = {})
      client     = gateway.client
      index_name = self.index_name
      if options[:force]
        begin
          client.indices.delete index: index_name
        rescue StandardError
          nil
        end
      end
      client.indices.create index: index_name,
                            body: { settings: { "index.requests.cache.enable": true } }
    end
def recreate_index ( options = { } ) client = gateway . client index_name = self . index_name if options [ :force ] begin client . indices . delete index : index_name rescue StandardError nil end end client . indices . create index : index_name , body : { settings : { "index.requests.cache.enable" : true } } end
don't raise an exception when not found
don ' t raise an exception when not found
options
<not_specific>