Class: ElasticGraph::Local::LocalIndexer

Inherits:
Object
  • Object
show all
Defined in:
lib/elastic_graph/local/local_indexer.rb

Instance Method Summary collapse

Constructor Details

#initialize(local_config_yaml, fake_data_batch_generator, output:) ⇒ LocalIndexer

Returns a new instance of LocalIndexer.



16
17
18
19
20
21
# File 'lib/elastic_graph/local/local_indexer.rb', line 16

def initialize(local_config_yaml, fake_data_batch_generator, output:)
  @local_indexer = ElasticGraph::Indexer.from_yaml_file(local_config_yaml)
  @indexing_coordinator = IndexingCoordinator.new(fake_data_batch_generator, output: output) do |batch|
    @local_indexer.processor.process(batch)
  end
end

Instance Method Details

#index_fake_data(num_batches) ⇒ Object



23
24
25
# File 'lib/elastic_graph/local/local_indexer.rb', line 23

def index_fake_data(num_batches)
  @indexing_coordinator.index_fake_data(num_batches)
end