Class: BaseIndexer::SolrConfigurationFromFile

Inherits:
SolrConfiguration show all
Includes:
Singleton
Defined in:
lib/base_indexer/config/solr_configuration_from_file.rb

Overview

It reads the solr configuration from YAML file

Instance Method Summary collapse

Instance Method Details

#get_configuration_hashHash

Returns hash represents the solr configuration.

Examples:

{"target1":{"url"=>"http://localhost/solr/"},"target2":{"url"=>"http://solr-cor.com/solr/"}}

{"target1":{"url"=>"http://localhost/solr/","open_timeout"=>120},"target2":{"url"=>"http://solr-cor.com/solr/"}}


21
22
23
# File 'lib/base_indexer/config/solr_configuration_from_file.rb', line 21

def get_configuration_hash
  @solr_config_hash
end

#read(yaml_file = nil) ⇒ Object

reads the solr yaml configuration file



12
13
14
# File 'lib/base_indexer/config/solr_configuration_from_file.rb', line 12

def read(yaml_file=nil)
  @solr_config_hash = YAML.load_file(yaml_file)
end