Module: Sunspot::Rails

Defined in:
lib/sunspot/rails.rb,
lib/sunspot/rails/server.rb,
lib/sunspot/rails/railtie.rb,
lib/sunspot/rails/version.rb,
lib/sunspot/rails/adapters.rb,
lib/sunspot/rails/searchable.rb,
lib/sunspot/rails/spec_helper.rb,
lib/sunspot/rails/solr_logging.rb,
lib/sunspot/rails/configuration.rb,
lib/sunspot/rails/log_subscriber.rb,
lib/sunspot/rails/request_lifecycle.rb,
lib/sunspot/rails/stub_session_proxy.rb,
lib/sunspot/rails/solr_instrumentation.rb,
lib/sunspot/rails/railties/controller_runtime.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Adapters, Railties, RequestLifecycle, Searchable, SolrInstrumentation, SolrLogging, SpecHelper Classes: Configuration, LogSubscriber, Railtie, Server, StubSessionProxy

Constant Summary collapse

VERSION =
'1.3.1'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject



17
18
19
# File 'lib/sunspot/rails.rb', line 17

def configuration
  @configuration ||= Sunspot::Rails::Configuration.new
end

Class Method Details

.build_session(configuration = self.configuration) ⇒ Object



25
26
27
28
29
30
31
32
33
34
# File 'lib/sunspot/rails.rb', line 25

def build_session(configuration = self.configuration)
  if configuration.has_master?
    SessionProxy::MasterSlaveSessionProxy.new(
      SessionProxy::ThreadLocalSessionProxy.new(master_config(configuration)),
      SessionProxy::ThreadLocalSessionProxy.new(slave_config(configuration))
    )
  else
    SessionProxy::ThreadLocalSessionProxy.new(slave_config(configuration))
  end
end

.resetObject



21
22
23
# File 'lib/sunspot/rails.rb', line 21

def reset
  @configuration = nil
end