parent
4bf5aeae83
commit
c3965e28b3
|
@ -10,10 +10,10 @@ class SearchService < BaseService
|
||||||
@resolve = options[:resolve] || false
|
@resolve = options[:resolve] || false
|
||||||
|
|
||||||
default_results.tap do |results|
|
default_results.tap do |results|
|
||||||
next if @query.blank?
|
next if @query.blank? || @limit.zero?
|
||||||
|
|
||||||
if url_query?
|
if url_query?
|
||||||
results.merge!(url_resource_results) unless url_resource.nil? || (@options[:type].present? && url_resource_symbol != @options[:type].to_sym)
|
results.merge!(url_resource_results) unless url_resource.nil? || @offset.positive? || (@options[:type].present? && url_resource_symbol != @options[:type].to_sym)
|
||||||
elsif @query.present?
|
elsif @query.present?
|
||||||
results[:accounts] = perform_accounts_search! if account_searchable?
|
results[:accounts] = perform_accounts_search! if account_searchable?
|
||||||
results[:statuses] = perform_statuses_search! if full_text_searchable?
|
results[:statuses] = perform_statuses_search! if full_text_searchable?
|
||||||
|
|
Reference in New Issue