Module: Riddle::Configuration::IndexSettings

Included in:
Index, RealtimeIndex, TemplateIndex
Defined in:
lib/riddle/configuration/index_settings.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bigram_freq_wordsObject

Returns the value of attribute bigram_freq_words.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def bigram_freq_words
  @bigram_freq_words
end

#bigram_indexObject

Returns the value of attribute bigram_index.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def bigram_index
  @bigram_index
end

#blend_charsObject

Returns the value of attribute blend_chars.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def blend_chars
  @blend_chars
end

#blend_modeObject

Returns the value of attribute blend_mode.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def blend_mode
  @blend_mode
end

#charset_dictpathObject

Returns the value of attribute charset_dictpath.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def charset_dictpath
  @charset_dictpath
end

#charset_tableObject

Returns the value of attribute charset_table.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def charset_table
  @charset_table
end

#charset_typeObject

Returns the value of attribute charset_type.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def charset_type
  @charset_type
end

#dictObject

Returns the value of attribute dict.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def dict
  @dict
end

#docinfoObject

Returns the value of attribute docinfo.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def docinfo
  @docinfo
end

#enable_starObject

Returns the value of attribute enable_star.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def enable_star
  @enable_star
end

#exception_filesObject

Returns the value of attribute exception_files.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def exception_files
  @exception_files
end

#expand_keywordsObject

Returns the value of attribute expand_keywords.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def expand_keywords
  @expand_keywords
end

#global_idfObject

Returns the value of attribute global_idf.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def global_idf
  @global_idf
end

#ha_strategyObject

Returns the value of attribute ha_strategy.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def ha_strategy
  @ha_strategy
end

#hitless_wordsObject

Returns the value of attribute hitless_words.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def hitless_words
  @hitless_words
end

#html_index_attrsObject

Returns the value of attribute html_index_attrs.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def html_index_attrs
  @html_index_attrs
end

#html_remove_element_tagsObject

Returns the value of attribute html_remove_element_tags.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def html_remove_element_tags
  @html_remove_element_tags
end

#html_stripObject

Returns the value of attribute html_strip.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def html_strip
  @html_strip
end

#ignore_charactersObject

Returns the value of attribute ignore_characters.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def ignore_characters
  @ignore_characters
end

#index_exact_wordsObject

Returns the value of attribute index_exact_words.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def index_exact_words
  @index_exact_words
end

#index_field_lengthsObject

Returns the value of attribute index_field_lengths.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def index_field_lengths
  @index_field_lengths
end

#index_spObject

Returns the value of attribute index_sp.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def index_sp
  @index_sp
end

#index_zonesObject

Returns the value of attribute index_zones.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def index_zones
  @index_zones
end

#infix_field_namesObject

Returns the value of attribute infix_field_names.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def infix_field_names
  @infix_field_names
end

#inplace_docinfo_gapObject

Returns the value of attribute inplace_docinfo_gap.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def inplace_docinfo_gap
  @inplace_docinfo_gap
end

#inplace_enableObject

Returns the value of attribute inplace_enable.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def inplace_enable
  @inplace_enable
end

#inplace_hit_gapObject

Returns the value of attribute inplace_hit_gap.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def inplace_hit_gap
  @inplace_hit_gap
end

#inplace_reloc_factorObject

Returns the value of attribute inplace_reloc_factor.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def inplace_reloc_factor
  @inplace_reloc_factor
end

#inplace_write_factorObject

Returns the value of attribute inplace_write_factor.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def inplace_write_factor
  @inplace_write_factor
end

#min_infix_lenObject

Returns the value of attribute min_infix_len.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def min_infix_len
  @min_infix_len
end

#min_prefix_lenObject

Returns the value of attribute min_prefix_len.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def min_prefix_len
  @min_prefix_len
end

#min_stemming_lenObject

Returns the value of attribute min_stemming_len.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def min_stemming_len
  @min_stemming_len
end

#min_word_lenObject

Returns the value of attribute min_word_len.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def min_word_len
  @min_word_len
end

#mlockObject

Returns the value of attribute mlock.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def mlock
  @mlock
end

#morphologiesObject

Returns the value of attribute morphologies.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def morphologies
  @morphologies
end

#nameObject

Returns the value of attribute name.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def name
  @name
end

#ngram_charactersObject

Returns the value of attribute ngram_characters.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def ngram_characters
  @ngram_characters
end

#ngram_lenObject

Returns the value of attribute ngram_len.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def ngram_len
  @ngram_len
end

#ondisk_attrsObject

Returns the value of attribute ondisk_attrs.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def ondisk_attrs
  @ondisk_attrs
end

#ondisk_dictObject

Returns the value of attribute ondisk_dict.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def ondisk_dict
  @ondisk_dict
end

#overshort_stepObject

Returns the value of attribute overshort_step.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def overshort_step
  @overshort_step
end

#pathObject

Returns the value of attribute path.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def path
  @path
end

#phrase_boundariesObject

Returns the value of attribute phrase_boundaries.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def phrase_boundaries
  @phrase_boundaries
end

#phrase_boundary_stepObject

Returns the value of attribute phrase_boundary_step.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def phrase_boundary_step
  @phrase_boundary_step
end

#prefix_field_namesObject

Returns the value of attribute prefix_field_names.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def prefix_field_names
  @prefix_field_names
end

#preopenObject

Returns the value of attribute preopen.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def preopen
  @preopen
end

#regexp_filterObject

Returns the value of attribute regexp_filter.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def regexp_filter
  @regexp_filter
end

#rlp_contextObject

Returns the value of attribute rlp_context.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def rlp_context
  @rlp_context
end

#stopword_filesObject

Returns the value of attribute stopword_files.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def stopword_files
  @stopword_files
end

#stopwords_stepObject

Returns the value of attribute stopwords_step.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def stopwords_step
  @stopwords_step
end

#stopwords_unstemmedObject

Returns the value of attribute stopwords_unstemmed.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def stopwords_unstemmed
  @stopwords_unstemmed
end

#typeObject

Returns the value of attribute type.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def type
  @type
end

#wordform_filesObject

Returns the value of attribute wordform_files.



23
24
25
# File 'lib/riddle/configuration/index_settings.rb', line 23

def wordform_files
  @wordform_files
end

Class Method Details

.settingsObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 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

Instance Method Details

#exceptionsObject



76
77
78
# File 'lib/riddle/configuration/index_settings.rb', line 76

def exceptions
  nil_join @exception_files, " "
end

#exceptions=(exceptions) ⇒ Object



80
81
82
# File 'lib/riddle/configuration/index_settings.rb', line 80

def exceptions=(exceptions)
  @exception_files = nil_split exceptions, ' '
end

#html_remove_elementsObject



132
133
134
# 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) ⇒ Object



136
137
138
# 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_charsObject



84
85
86
# File 'lib/riddle/configuration/index_settings.rb', line 84

def ignore_chars
  nil_join @ignore_characters, ", "
end

#ignore_chars=(ignore_chars) ⇒ Object



88
89
90
# File 'lib/riddle/configuration/index_settings.rb', line 88

def ignore_chars=(ignore_chars)
  @ignore_characters = nil_split ignore_chars, /,\s?/
end

#infix_fieldsObject



104
105
106
# File 'lib/riddle/configuration/index_settings.rb', line 104

def infix_fields
  nil_join @infix_field_names, ", "
end

#infix_fields=(fields) ⇒ Object



108
109
110
111
112
113
114
# 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_settingsObject



38
39
40
41
42
43
44
45
46
47
48
49
50
# 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

#morphologyObject



52
53
54
# File 'lib/riddle/configuration/index_settings.rb', line 52

def morphology
  nil_join @morphologies, ", "
end

#morphology=(morphology) ⇒ Object



56
57
58
# File 'lib/riddle/configuration/index_settings.rb', line 56

def morphology=(morphology)
  @morphologies = nil_split morphology, /,\s?/
end

#ngram_charsObject



116
117
118
# File 'lib/riddle/configuration/index_settings.rb', line 116

def ngram_chars
  nil_join @ngram_characters, ", "
end

#ngram_chars=(ngram_chars) ⇒ Object



120
121
122
# File 'lib/riddle/configuration/index_settings.rb', line 120

def ngram_chars=(ngram_chars)
  @ngram_characters = nil_split ngram_chars, /,\s?/
end

#phrase_boundaryObject



124
125
126
# File 'lib/riddle/configuration/index_settings.rb', line 124

def phrase_boundary
  nil_join @phrase_boundaries, ", "
end

#phrase_boundary=(phrase_boundary) ⇒ Object



128
129
130
# File 'lib/riddle/configuration/index_settings.rb', line 128

def phrase_boundary=(phrase_boundary)
  @phrase_boundaries = nil_split phrase_boundary, /,\s?/
end

#prefix_fieldsObject



92
93
94
# File 'lib/riddle/configuration/index_settings.rb', line 92

def prefix_fields
  nil_join @prefix_field_names, ", "
end

#prefix_fields=(fields) ⇒ Object



96
97
98
99
100
101
102
# 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

#stopwordsObject



60
61
62
# File 'lib/riddle/configuration/index_settings.rb', line 60

def stopwords
  nil_join @stopword_files, " "
end

#stopwords=(stopwords) ⇒ Object



64
65
66
# File 'lib/riddle/configuration/index_settings.rb', line 64

def stopwords=(stopwords)
  @stopword_files = nil_split stopwords, ' '
end

#wordformsObject



68
69
70
# File 'lib/riddle/configuration/index_settings.rb', line 68

def wordforms
  nil_join @wordform_files, " "
end

#wordforms=(wordforms) ⇒ Object



72
73
74
# File 'lib/riddle/configuration/index_settings.rb', line 72

def wordforms=(wordforms)
  @wordform_files = nil_split wordforms, ' '
end