Class: Elasticity::Bulk::Alias
- Inherits:
-
Elasticity::Bulk
- Object
- Elasticity::Bulk
- Elasticity::Bulk::Alias
- Defined in:
- lib/elasticity/bulk.rb
Instance Method Summary collapse
- #delete(id) ⇒ Object
- #index(id, attributes) ⇒ Object
-
#initialize(client, update_alias, delete_indexes) ⇒ Alias
constructor
A new instance of Alias.
- #update(id, attributes) ⇒ Object
Methods inherited from Elasticity::Bulk
Constructor Details
#initialize(client, update_alias, delete_indexes) ⇒ Alias
Returns a new instance of Alias.
44 45 46 47 48 |
# File 'lib/elasticity/bulk.rb', line 44 def initialize(client, update_alias, delete_indexes) super(client) @update_alias = update_alias @delete_indexes = delete_indexes end |
Instance Method Details
#delete(id) ⇒ Object
58 59 60 61 62 |
# File 'lib/elasticity/bulk.rb', line 58 def delete(id) @delete_indexes.each do |index| super(index, id) end end |
#index(id, attributes) ⇒ Object
50 51 52 |
# File 'lib/elasticity/bulk.rb', line 50 def index(id, attributes) super(@update_alias, id, attributes) end |
#update(id, attributes) ⇒ Object
54 55 56 |
# File 'lib/elasticity/bulk.rb', line 54 def update(id, attributes) super(@update_alias, id, attributes) end |