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.
69 70 71 |
# File 'lib/full_search/model.rb', line 69 def full_search_highlight_fields @full_search_highlight_fields end |
#full_search_snippet ⇒ Object
Returns the value of attribute full_search_snippet.
69 70 71 |
# File 'lib/full_search/model.rb', line 69 def full_search_snippet @full_search_snippet end |
Instance Method Details
#full_search_text_for(field_name) ⇒ Object
71 72 73 74 75 76 77 |
# File 'lib/full_search/model.rb', line 71 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 |