Class: Sunspot::Type::TextType
- Inherits:
-
AbstractType
- Object
- AbstractType
- Sunspot::Type::TextType
- Defined in:
- lib/sunspot/type.rb
Overview
Text is a special type that stores data for fulltext search. Unlike other types, Text fields are tokenized and are made available to the keyword search phrase. Text fields cannot be faceted, ordered upon, or used in restrictions. Similarly, text fields are the only fields that are made available to keyword search.
Instance Method Summary collapse
- #accepts_dynamic? ⇒ Boolean
- #accepts_more_like_this? ⇒ Boolean
- #cast(text) ⇒ Object
-
#indexed_name(name) ⇒ Object
:nodoc:.
-
#to_indexed(value) ⇒ Object
:nodoc:.
Methods inherited from AbstractType
Instance Method Details
#accepts_dynamic? ⇒ Boolean
106 107 108 |
# File 'lib/sunspot/type.rb', line 106 def accepts_dynamic? false end |
#accepts_more_like_this? ⇒ Boolean
110 111 112 |
# File 'lib/sunspot/type.rb', line 110 def accepts_more_like_this? true end |
#cast(text) ⇒ Object
102 103 104 |
# File 'lib/sunspot/type.rb', line 102 def cast(text) text end |
#indexed_name(name) ⇒ Object
:nodoc:
94 95 96 |
# File 'lib/sunspot/type.rb', line 94 def indexed_name(name) #:nodoc: "#{name}_text" end |
#to_indexed(value) ⇒ Object
:nodoc:
98 99 100 |
# File 'lib/sunspot/type.rb', line 98 def to_indexed(value) #:nodoc: value.to_s if value end |