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



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

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



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

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:



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

def render
  raise ConfigurationError unless valid?

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