Module: Sunspot::Rails

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

Overview

:nodoc: :nodoc:

Defined Under Namespace

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

Class Attribute Summary (collapse)

Class Method Summary (collapse)

Class Attribute Details

+ (Object) configuration



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

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

Class Method Details

+ (Object) build_session(configuration = self.configuration)



29
30
31
32
33
34
35
36
37
38
39
40
# File 'sunspot_rails/lib/sunspot/rails.rb', line 29

def build_session(configuration = self.configuration)
  if configuration.disabled?
    StubSessionProxy.new(Sunspot.session)
  elsif 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

+ (Object) reset



25
26
27
# File 'sunspot_rails/lib/sunspot/rails.rb', line 25

def reset
  @configuration = nil
end