Class: Sunspot::Search::MoreLikeThisSearch
- Inherits:
-
AbstractSearch
- Object
- AbstractSearch
- Sunspot::Search::MoreLikeThisSearch
- Defined in:
- sunspot/lib/sunspot/search/more_like_this_search.rb
Instance Attribute Summary
Attributes inherited from AbstractSearch
facets, query, request_handler
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, #hits, #initialize, #inspect, #populate_hits, #results, #total
Constructor Details
This class inherits a constructor from Sunspot::Search::AbstractSearch
Instance Method Details
- (Object) execute
10 11 12 13 14 15 16 17 |
# File 'sunspot/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 |
- (Object) request_handler
19 20 21 |
# File 'sunspot/lib/sunspot/search/more_like_this_search.rb', line 19 def request_handler super || :mlt end |