Module: ThinkingSphinx

Defined in:
lib/thinking_sphinx.rb,
lib/thinking_sphinx/active_record/sql_source.rb,
lib/thinking_sphinx/active_record/sql_builder.rb,
lib/thinking_sphinx/active_record/sql_builder/query.rb,
lib/thinking_sphinx/active_record/sql_builder/statement.rb,
lib/thinking_sphinx/active_record/sql_builder/clause_builder.rb

Defined Under Namespace

Modules: ActiveRecord, Connection, Core, Deltas, Distributed, Frameworks, Guard, Masks, Middlewares, Panes, Query, RealTime, Scopes, SphinxQL, Subscribers Classes: BatchedSearch, Callbacks, Configuration, ConnectionError, Controller, Deletion, Excerpter, Facet, FacetSearch, FloatFormatter, Index, IndexSet, Logger, MissingColumnError, MixedScopesError, NoIndicesError, ParseError, PopulatedResultsError, QueryError, QueryExecutionError, Railtie, RakeInterface, Search, SphinxError, SyntaxError, Test, UTF8, Wildcard

Class Method Summary collapse

Class Method Details

.before_index_hooksObject



35
36
37
# File 'lib/thinking_sphinx.rb', line 35

def self.before_index_hooks
  @before_index_hooks
end

.count(query = '', options = {}) ⇒ Object



18
19
20
# File 'lib/thinking_sphinx.rb', line 18

def self.count(query = '', options = {})
  search(query, options).total_entries
end

.facets(query = '', options = {}) ⇒ Object



22
23
24
# File 'lib/thinking_sphinx.rb', line 22

def self.facets(query = '', options = {})
  ThinkingSphinx::FacetSearch.new query, options
end

.search(query = '', options = {}) ⇒ Object



26
27
28
# File 'lib/thinking_sphinx.rb', line 26

def self.search(query = '', options = {})
  ThinkingSphinx::Search.new query, options
end

.search_for_ids(query = '', options = {}) ⇒ Object



30
31
32
33
# File 'lib/thinking_sphinx.rb', line 30

def self.search_for_ids(query = '', options = {})
  search = ThinkingSphinx::Search.new query, options
  ThinkingSphinx::Search::Merger.new(search).merge! nil, :ids_only => true
end