Class: Sunspot::Search::MoreLikeThisSearch
- Inherits:
-
AbstractSearch
- Object
- AbstractSearch
- Sunspot::Search::MoreLikeThisSearch
- Defined in:
- lib/sunspot/search/more_like_this_search.rb
Instance Attribute Summary
Attributes inherited from AbstractSearch
Instance Method Summary collapse
Methods inherited from AbstractSearch
#add_date_facet, #add_field_facet, #add_query_facet, #build, #data_accessor_for, #dynamic_facet, #each_hit_with_result, #execute!, #facet, #facet_response, #fq_response_header, #hits, #initialize, #inspect, #populate_hits, #results, #total
Constructor Details
This class inherits a constructor from Sunspot::Search::AbstractSearch
Instance Method Details
#execute ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/sunspot/search/more_like_this_search.rb', line 10 def execute if @query.more_like_this.fields.empty? @setup.all_more_like_this_fields.each do |field| @query.more_like_this.add_field(field) end end super end |
#request_handler ⇒ Object
19 20 21 |
# File 'lib/sunspot/search/more_like_this_search.rb', line 19 def request_handler super || :mlt end |