module Elos::Repository::Adapter::Elos::Migratable

Public Instance Methods

migrate() click to toggle source
# File lib/elos/repository/adapter/elos/migratable.rb, line 5
def migrate
  reindex do |old_index_name, new_index_name|
    _scan(index_name: old_index_name) do |hit|
      client.update(index: new_index_name, type: type_name, id: hit['_id'], body: { doc: {}, upsert: hit['_source'] })
    end
  end
end