Class: PyramidScheme::IndexClient

Inherits:
Object
  • Object
show all
Defined in:
lib/pyramid_scheme/index_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ IndexClient

Returns a new instance of IndexClient.



4
5
6
7
# File 'lib/pyramid_scheme/index_client.rb', line 4

def initialize(options = {})
  @configuration = PyramidScheme::Configuration.new(options)
  @index_provider = @configuration[:index_provider_class].new
end

Instance Attribute Details

#index_providerObject (readonly)

Returns the value of attribute index_provider.



3
4
5
# File 'lib/pyramid_scheme/index_client.rb', line 3

def index_provider
  @index_provider
end

Instance Method Details

#bounce_pidsObject



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

def bounce_pids
  PyramidScheme::ProcessManager.bounce_searchd
end

#retrieve_indexObject



9
10
11
12
# File 'lib/pyramid_scheme/index_client.rb', line 9

def retrieve_index
  @index_provider.retrieve_index
  bounce_pids
end