class EsMigrationDsl
Public Class Methods
template(name)
click to toggle source
# File lib/wukong-migrate/elasticsearch_migration.rb, line 4 def self.template name <<-TEMPLATE.gsub(/^ {6}/, '').strip EsMigration.define '#{name}' do # Use dsl methods to: # * create/update/delete indices # * update index settings # * add/remove aliases # * create/update/delete mappings using models defined in app/models # # create_index(:index_name) do # number_of_replicas 5 # alias_to [:alias_one, :alias_two] # create_mapping(:model_name) do # dynamic true # ttl true # end # end end TEMPLATE end
Public Instance Methods
operation_list()
click to toggle source
# File lib/wukong-migrate/elasticsearch_migration.rb, line 25 def operation_list @operation_list ||= [] end