Class: Riddle::Configuration::Indexer

Inherits:
Section
  • Object
show all
Defined in:
lib/riddle/configuration/indexer.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Section

#valid?

Class Method Details

.settingsObject


4
5
6
7
8
9
10
# File 'lib/riddle/configuration/indexer.rb', line 4

def self.settings
  [
    :mem_limit, :max_iops, :max_iosize, :max_xmlpipe2_field,
    :write_buffer, :max_file_field_buffer, :on_file_field_error,
    :lemmatizer_cache
  ] + shared_settings
end

.shared_settingsObject


12
13
14
15
16
17
18
# File 'lib/riddle/configuration/indexer.rb', line 12

def self.shared_settings
  [
    :lemmatizer_base, :json_autoconv_numbers, :json_autoconv_keynames,
    :on_json_attr_error, :rlp_root, :rlp_environment, :rlp_max_batch_size,
    :rlp_max_batch_docs
  ]
end

Instance Method Details

#renderObject

Raises:


22
23
24
25
26
27
28
29
30
# File 'lib/riddle/configuration/indexer.rb', line 22

def render
  raise ConfigurationError unless valid?

  (
    ["indexer", "{"] +
    settings_body +
    ["}", ""]
  ).join("\n")
end