Class: Leda::Stores::Elasticsearch

Inherits:
Object
  • Object
show all
Includes:
Leda::Store
Defined in:
lib/leda/stores/elasticsearch.rb

Defined Under Namespace

Classes: Runner

Instance Attribute Summary collapse

Attributes included from Leda::Store

#options

Instance Method Summary collapse

Methods included from Leda::Store

default_name, find, included, #name, register_store, registered_stores

Constructor Details

#initializeElasticsearch



12
13
14
15
16
# File 'lib/leda/stores/elasticsearch.rb', line 12

def initialize(*)
  super

  @indices = options[:indices] || options[:indexes]
end

Instance Attribute Details

#indicesObject (readonly)

Returns the value of attribute indices.



10
11
12
# File 'lib/leda/stores/elasticsearch.rb', line 10

def indices
  @indices
end

Instance Method Details

#dump(directory) ⇒ Object



18
19
20
# File 'lib/leda/stores/elasticsearch.rb', line 18

def dump(directory)
  Runner.new(directory, indices, es_client).dump
end

#restore_from(directory) ⇒ Object



22
23
24
# File 'lib/leda/stores/elasticsearch.rb', line 22

def restore_from(directory)
  Runner.new(directory, indices, es_client).restore
end