Class: Sunspot::FulltextField
Overview
FulltextField instances represent fields that are indexed as fulltext. These fields are tokenized in the index, and can have boost applied to them. They also always allow multiple values (since the only downside of allowing multiple values is that it prevents the field from being sortable, and sorting on tokenized fields is nonsensical anyway, there is no reason to do otherwise). FulltextField instances always have the type TextType.
Instance Attribute Summary collapse
-
#default_boost ⇒ Object
readonly
:nodoc:.
Attributes inherited from Field
#boost, #name, #reference, #type
Instance Method Summary collapse
- #indexed_name ⇒ Object
-
#initialize(name, options = {}) ⇒ FulltextField
constructor
A new instance of FulltextField.
Methods inherited from Field
#cast, #eql?, #hash, #joined?, #more_like_this?, #multiple?, #stored?, #to_indexed
Constructor Details
#initialize(name, options = {}) ⇒ FulltextField
Returns a new instance of FulltextField.
157 158 159 160 161 162 163 164 |
# File 'lib/sunspot/field.rb', line 157 def initialize(name, = {}) super(name, Type::TextType.instance, ) @multiple = true @boost = .delete(:boost) @default_boost = .delete(:default_boost) () end |
Instance Attribute Details
#default_boost ⇒ Object (readonly)
:nodoc:
155 156 157 |
# File 'lib/sunspot/field.rb', line 155 def default_boost @default_boost end |
Instance Method Details
#indexed_name ⇒ Object
166 167 168 |
# File 'lib/sunspot/field.rb', line 166 def indexed_name "#{super}" end |