module ThinkingSphinx::ActiveRecord::Base::ClassMethods

Public Instance Methods

facets(query = nil, options = {}) click to toggle source
# File lib/thinking_sphinx/active_record/base.rb, line 15
def facets(query = nil, options = {})
  merge_search ThinkingSphinx.facets, query, options
end
search_count(query = nil, options = {}) click to toggle source
# File lib/thinking_sphinx/active_record/base.rb, line 23
def search_count(query = nil, options = {})
  search(query, options).total_entries
end
search_for_ids(query = nil, options = {}) click to toggle source
# File lib/thinking_sphinx/active_record/base.rb, line 27
def search_for_ids(query = nil, options = {})
  search = search query, options
  ThinkingSphinx::Search::Merger.new(search).merge! nil, :ids_only => true
end

Private Instance Methods

default_sphinx_scope?() click to toggle source
# File lib/thinking_sphinx/active_record/base.rb, line 34
def default_sphinx_scope?
  respond_to?(:default_sphinx_scope) && default_sphinx_scope
end
default_sphinx_scope_response() click to toggle source
# File lib/thinking_sphinx/active_record/base.rb, line 38
def default_sphinx_scope_response
  [sphinx_scopes[default_sphinx_scope].call].flatten
end