Class: EsMigrationDsl
- Inherits:
-
Wukong::Migration::Dsl
- Object
- Wukong::Migration::Dsl
- EsMigrationDsl
- Includes:
- EsHttpOperation::Helpers
- Defined in:
- lib/wukong-migrate/elasticsearch_migration.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
Methods included from EsHttpOperation::Helpers
#alias_index_op, #create_index_op, #delete_index_op, #update_mapping_op, #update_settings_op
Methods inherited from Wukong::Migration::Dsl
Methods included from Gorillib::Builder
#getset, #getset_collection_item
Class Method Details
.template(name) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/wukong-migrate/elasticsearch_migration.rb', line 4 def self.template name " EsMigration.define '\#{name}' do\n # Use dsl methods to: \n # * create/update/delete indices\n # * update index settings\n # * add/remove aliases\n # * create/update/delete mappings using models defined in app/models\n #\n # create_index(:index_name) do\n # number_of_replicas 5\n # alias_to [:alias_one, :alias_two]\n # create_mapping(:model_name) do\n # dynamic true\n # ttl true\n # end\n # end\n end\n TEMPLATE\nend\n".gsub(/^ {6}/, '').strip |
Instance Method Details
#operation_list ⇒ Object
25 26 27 |
# File 'lib/wukong-migrate/elasticsearch_migration.rb', line 25 def operation_list @operation_list ||= [] end |