module Riddle::Configuration::IndexSettings
Attributes
bigram_freq_words[RW]
bigram_index[RW]
blend_chars[RW]
blend_mode[RW]
charset_dictpath[RW]
charset_table[RW]
charset_type[RW]
dict[RW]
docinfo[RW]
enable_star[RW]
exception_files[RW]
expand_keywords[RW]
global_idf[RW]
ha_strategy[RW]
hitless_words[RW]
html_index_attrs[RW]
html_strip[RW]
ignore_characters[RW]
index_exact_words[RW]
index_field_lengths[RW]
index_sp[RW]
index_zones[RW]
infix_field_names[RW]
inplace_docinfo_gap[RW]
inplace_enable[RW]
inplace_hit_gap[RW]
inplace_reloc_factor[RW]
inplace_write_factor[RW]
min_infix_len[RW]
min_prefix_len[RW]
min_stemming_len[RW]
min_word_len[RW]
mlock[RW]
morphologies[RW]
name[RW]
ngram_characters[RW]
ngram_len[RW]
ondisk_attrs[RW]
ondisk_dict[RW]
overshort_step[RW]
path[RW]
phrase_boundaries[RW]
phrase_boundary_step[RW]
prefix_field_names[RW]
preopen[RW]
regexp_filter[RW]
rlp_context[RW]
stopword_files[RW]
stopwords_step[RW]
stopwords_unstemmed[RW]
type[RW]
wordform_files[RW]
Public Class Methods
settings()
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 4 def self.settings [ :type, :path, :docinfo, :mlock, :morphology, :dict, :index_sp, :index_zones, :min_stemming_len, :stopwords, :wordforms, :exceptions, :min_word_len, :charset_dictpath, :charset_type, :charset_table, :ignore_chars, :min_prefix_len, :min_infix_len, :prefix_fields, :infix_fields, :enable_star, :expand_keywords, :ngram_len, :ngram_chars, :phrase_boundary, :phrase_boundary_step, :blend_chars, :blend_mode, :html_strip, :html_index_attrs, :html_remove_elements, :preopen, :ondisk_dict, :inplace_enable, :inplace_hit_gap, :inplace_docinfo_gap, :inplace_reloc_factor, :inplace_write_factor, :index_exact_words, :overshort_step, :stopwords_step, :hitless_words, :ha_strategy, :bigram_freq_words, :bigram_index, :index_field_lengths, :regexp_filter, :stopwords_unstemmed, :global_idf, :rlp_context, :ondisk_attrs ] end
Public Instance Methods
exceptions()
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 76 def exceptions nil_join @exception_files, " " end
exceptions=(exceptions)
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 80 def exceptions=(exceptions) @exception_files = nil_split exceptions, ' ' end
html_remove_elements()
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 132 def html_remove_elements nil_join @html_remove_element_tags, ", " end
html_remove_elements=(html_remove_elements)
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 136 def html_remove_elements=(html_remove_elements) @html_remove_element_tags = nil_split html_remove_elements, /,\s?/ end
ignore_chars()
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 84 def ignore_chars nil_join @ignore_characters, ", " end
ignore_chars=(ignore_chars)
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 88 def ignore_chars=(ignore_chars) @ignore_characters = nil_split ignore_chars, /,\s?/ end
infix_fields()
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 104 def infix_fields nil_join @infix_field_names, ", " end
infix_fields=(fields)
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 108 def infix_fields=(fields) if fields.is_a?(Array) @infix_field_names = fields else @infix_field_names = fields.split(/,\s*/) end end
initialize_settings()
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 38 def initialize_settings @morphologies = [] @stopword_files = [] @wordform_files = [] @exception_files = [] @ignore_characters = [] @prefix_field_names = [] @infix_field_names = [] @ngram_characters = [] @phrase_boundaries = [] @html_remove_element_tags = [] @regexp_filter = [] end
morphology()
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 52 def morphology nil_join @morphologies, ", " end
morphology=(morphology)
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 56 def morphology=(morphology) @morphologies = nil_split morphology, /,\s?/ end
ngram_chars()
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 116 def ngram_chars nil_join @ngram_characters, ", " end
ngram_chars=(ngram_chars)
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 120 def ngram_chars=(ngram_chars) @ngram_characters = nil_split ngram_chars, /,\s?/ end
phrase_boundary()
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 124 def phrase_boundary nil_join @phrase_boundaries, ", " end
phrase_boundary=(phrase_boundary)
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 128 def phrase_boundary=(phrase_boundary) @phrase_boundaries = nil_split phrase_boundary, /,\s?/ end
prefix_fields()
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 92 def prefix_fields nil_join @prefix_field_names, ", " end
prefix_fields=(fields)
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 96 def prefix_fields=(fields) if fields.is_a?(Array) @prefix_field_names = fields else @prefix_field_names = fields.split(/,\s*/) end end
stopwords()
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 60 def stopwords nil_join @stopword_files, " " end
stopwords=(stopwords)
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 64 def stopwords=(stopwords) @stopword_files = nil_split stopwords, ' ' end
wordforms()
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 68 def wordforms nil_join @wordform_files, " " end
wordforms=(wordforms)
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 72 def wordforms=(wordforms) @wordform_files = nil_split wordforms, ' ' end
Private Instance Methods
nil_join(array, delimiter)
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 146 def nil_join(array, delimiter) if array.length == 0 nil else array.join(delimiter) end end
nil_split(string, pattern)
click to toggle source
# File lib/riddle/configuration/index_settings.rb, line 142 def nil_split(string, pattern) (string || "").split(pattern) end