embulk-output-elasticsearch_ruby 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa58203826c27f09b0718aef621215454a566ba8
4
- data.tar.gz: 56df8f9037ab43256371ac5ce6676fd2b4090b51
3
+ metadata.gz: be42f1b9b4d5953efa82af4f11eff2d1871e28d7
4
+ data.tar.gz: 994268d29c57b5f1145e1f4ac79922da18282c9c
5
5
  SHA512:
6
- metadata.gz: 2d8b36ea7a732fb07726c5c0ab97c29f74f6c4d0becfe05944004ee4dd504da0d783ec3e6d3435c959f9e2a2490b23cc2ecda4802fd98082080c0fbd0f211059
7
- data.tar.gz: 88726e478cd79064319e478457b7144d8b762e867d5bc206d6fdc000bec394d8fb3624ac6018c52c6c2a84285b600c4ee016576a706b79eb81ec250258b377a6
6
+ metadata.gz: ffd1752f6ae7f52fb1bc8a07d90ff59633f05799c31cf05f207f1607a31ab298aab48c031e7c1b6634dd9751c757a449b4ad94cce930f36195f0c22c415aaa52
7
+ data.tar.gz: 8ea0f41e0de01e06f3916b4b1c2377260097536d9f9b68abc31a8962655ef0b74ee750d4de1b11bcd601c8c38b3b25f062b9a66aff5409d4ea67debf99f53d2b
@@ -1,7 +1,7 @@
1
1
 
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "embulk-output-elasticsearch_ruby"
4
- spec.version = "0.1.3"
4
+ spec.version = "0.1.4"
5
5
  spec.authors = ["toyama0919"]
6
6
  spec.summary = "Elasticsearch Ruby output plugin for Embulk. Elasticsearch 1.X AND 2.X AND 5.X compatible."
7
7
  spec.description = "Dumps records to Elasticsearch Ruby. Elasticsearch 1.X AND 2.X AND 5.X compatible."
@@ -17,6 +17,7 @@ module Embulk
17
17
  "reload_connections" => config.param("reload_connections", :bool, default: true),
18
18
  "reload_on_failure" => config.param("reload_on_failure", :bool, default: false),
19
19
  "delete_old_index" => config.param("delete_old_index", :bool, default: false),
20
+ "delete_old_alias" => config.param("delete_old_alias", :bool, default: true),
20
21
  "index_type" => config.param("index_type", :string),
21
22
  "id_keys" => config.param("id_keys", :array, default: nil),
22
23
  "id_format" => config.param("id_format", :string, default: nil),
@@ -89,8 +90,10 @@ module Embulk
89
90
  indices = client.indices.get_alias(name: task['index']).keys
90
91
  indices.each { |index|
91
92
  if index != get_index(task)
92
- client.indices.delete_alias index: index, name: task['index']
93
- Embulk.logger.info "deleted alias: #{task['index']}, index: #{index}"
93
+ if task['delete_old_alias']
94
+ client.indices.delete_alias index: index, name: task['index']
95
+ Embulk.logger.info "deleted alias: #{task['index']}, index: #{index}"
96
+ end
94
97
  if task['delete_old_index']
95
98
  client.indices.delete index: index
96
99
  Embulk.logger.info "deleted index: #{index}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-elasticsearch_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - toyama0919