Module: FullSearch::Model::InstanceMethods
- Defined in:
- lib/full_search/model.rb
Instance Attribute Summary collapse
-
#full_search_highlight_fields ⇒ Object
Returns the value of attribute full_search_highlight_fields.
-
#full_search_snippet ⇒ Object
Returns the value of attribute full_search_snippet.
Instance Method Summary collapse
Instance Attribute Details
#full_search_highlight_fields ⇒ Object
Returns the value of attribute full_search_highlight_fields.
61 62 63 |
# File 'lib/full_search/model.rb', line 61 def full_search_highlight_fields @full_search_highlight_fields end |
#full_search_snippet ⇒ Object
Returns the value of attribute full_search_snippet.
61 62 63 |
# File 'lib/full_search/model.rb', line 61 def full_search_snippet @full_search_snippet end |
Instance Method Details
#full_search_text_for(field_name) ⇒ Object
63 64 65 66 67 68 69 |
# File 'lib/full_search/model.rb', line 63 def full_search_text_for(field_name) dsl = self.class.full_search_dsl field = dsl.fields.find { |f| f.name == field_name.to_s || f.as == field_name.to_s } return nil unless field FullSearch::Model.evaluate_source(self, field) end |