Module: ThinkingSphinx::ActiveRecord::Base::ClassMethods

Defined in:
lib/thinking_sphinx/active_record/base.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) facets(query = nil, options = {})



15
16
17
# File 'lib/thinking_sphinx/active_record/base.rb', line 15

def facets(query = nil, options = {})
  merge_search ThinkingSphinx.facets, query, options
end

- (Object) search(query = nil, options = {})



19
20
21
# File 'lib/thinking_sphinx/active_record/base.rb', line 19

def search(query = nil, options = {})
  merge_search ThinkingSphinx.search, query, options
end

- (Object) search_count(query = nil, options = {})



23
24
25
# File 'lib/thinking_sphinx/active_record/base.rb', line 23

def search_count(query = nil, options = {})
  search(query, options).total_entries
end

- (Object) search_for_ids(query = nil, options = {})



27
28
29
30
# 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