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, Commands, Connection, Core, Deltas, Distributed, Frameworks, Guard, Hooks, IndexingStrategies, Interfaces, Masks, Middlewares, Panes, Query, RealTime, Scopes, Subscribers, WithOutput Classes: AttributeTypes, BatchedSearch, Callbacks, Commander, Configuration, ConnectionError, Deletion, DuplicateNameError, Excerpter, Facet, FacetSearch, FloatFormatter, Index, IndexSet, InvalidDatabaseAdapter, Logger, MissingColumnError, MixedScopesError, NoIndicesError, OutOfBoundsError, ParseError, PopulatedResultsError, Processor, QueryError, QueryExecutionError, QueryLengthError, Railtie, RakeInterface, Search, Settings, SphinxAlreadyRunning, SphinxError, SyntaxError, Test, TranscriptionError, UTF8, UnknownAttributeType, UnknownCommand, UnknownDatabaseAdapter, Wildcard

Class Method Summary collapse

Class Method Details

.before_index_hooksObject



37
38
39
# File 'lib/thinking_sphinx.rb', line 37

def self.before_index_hooks
  @before_index_hooks
end

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



20
21
22
# File 'lib/thinking_sphinx.rb', line 20

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

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



24
25
26
# File 'lib/thinking_sphinx.rb', line 24

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

.outputObject



43
44
45
# File 'lib/thinking_sphinx.rb', line 43

def self.output
  @output
end

.rake_interfaceObject



49
50
51
# File 'lib/thinking_sphinx.rb', line 49

def self.rake_interface
  @rake_interface ||= ThinkingSphinx::RakeInterface
end

.rake_interface=(interface) ⇒ Object



53
54
55
# File 'lib/thinking_sphinx.rb', line 53

def self.rake_interface=(interface)
  @rake_interface = interface
end

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



28
29
30
# File 'lib/thinking_sphinx.rb', line 28

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

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



32
33
34
35
# File 'lib/thinking_sphinx.rb', line 32

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