Module: SolrWrapper

Defined in:
lib/solr_wrapper.rb,
lib/solr_wrapper/md5.rb,
lib/solr_wrapper/client.rb,
lib/solr_wrapper/version.rb,
lib/solr_wrapper/instance.rb,
lib/solr_wrapper/settings.rb,
lib/solr_wrapper/rake_task.rb,
lib/solr_wrapper/downloader.rb,
lib/solr_wrapper/configuration.rb

Defined Under Namespace

Modules: RakeTask Classes: Client, Configuration, Downloader, Instance, MD5, Settings, SolrWrapperError

Constant Summary collapse

VERSION =
'0.13.1'

Class Method Summary collapse

Class Method Details

.default_instance(options = {}) ⇒ Object



29
30
31
# File 'lib/solr_wrapper.rb', line 29

def self.default_instance(options = {})
  @default_instance ||= instance(default_instance_options)
end

.default_instance_optionsObject



18
19
20
21
22
23
# File 'lib/solr_wrapper.rb', line 18

def self.default_instance_options
  @default_instance_options ||= {
    port: SolrWrapper.default_solr_port,
    version: SolrWrapper.default_solr_version
  }
end

.default_instance_options=(options) ⇒ Object



25
26
27
# File 'lib/solr_wrapper.rb', line 25

def self.default_instance_options=(options)
  @default_instance_options = options
end

.default_solr_portObject



14
15
16
# File 'lib/solr_wrapper.rb', line 14

def self.default_solr_port
  '8983'
end

.default_solr_versionObject



10
11
12
# File 'lib/solr_wrapper.rb', line 10

def self.default_solr_version
  '6.1.0'
end

.instance(options = {}) ⇒ Object



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

def self.instance(options = {})
  SolrWrapper::Instance.new(options)
end

.wrap(options = {}, &block) ⇒ Object

Ensures a Solr service is running before executing the block



39
40
41
# File 'lib/solr_wrapper.rb', line 39

def self.wrap(options = {}, &block)
  instance(options).wrap &block
end