Class: Elasticity::Bulk::Alias

Inherits:
Elasticity::Bulk show all
Defined in:
lib/elasticity/bulk.rb

Instance Method Summary collapse

Methods inherited from Elasticity::Bulk

#execute

Constructor Details

#initialize(client, update_alias, delete_indexes) ⇒ Alias

Returns a new instance of Alias.


36
37
38
39
40
# File 'lib/elasticity/bulk.rb', line 36

def initialize(client, update_alias, delete_indexes)
  super(client)
  @update_alias   = update_alias
  @delete_indexes = delete_indexes
end

Instance Method Details

#delete(type, id) ⇒ Object


46
47
48
49
50
# File 'lib/elasticity/bulk.rb', line 46

def delete(type, id)
  @delete_indexes.each do |index|
    super(index, type, id)
  end
end

#index(type, id, attributes) ⇒ Object


42
43
44
# File 'lib/elasticity/bulk.rb', line 42

def index(type, id, attributes)
  super(@update_alias, type, id, attributes)
end