Class: Elasticated::PartitionedRepository

Inherits:
Repository
  • Object
show all
Defined in:
lib/elasticated/partitioned_repository.rb

Instance Attribute Summary collapse

Attributes inherited from Repository

#client

Instance Method Summary collapse

Methods inherited from Repository

#create_percolator, #delete_by, #execute_aggregated_search, #execute_aggregations, #execute_count, #execute_search, #exists?, #index_document, #percolate, #prepare_search, #restore_search, #update_document

Methods included from Configurable

delegated

Constructor Details

#initialize(index_selector, opts = {}) ⇒ PartitionedRepository

Returns a new instance of PartitionedRepository.



6
7
8
9
# File 'lib/elasticated/partitioned_repository.rb', line 6

def initialize(index_selector, opts={})
  self.index_selector = index_selector
  super opts
end

Instance Attribute Details

#index_selectorObject

Returns the value of attribute index_selector.



4
5
6
# File 'lib/elasticated/partitioned_repository.rb', line 4

def index_selector
  @index_selector
end

Instance Method Details

#refresh_indices_for(query) ⇒ Object



11
12
13
14
# File 'lib/elasticated/partitioned_repository.rb', line 11

def refresh_indices_for(query)
  affected_indices = affected_indices_for query
  client.refresh_indices affected_indices
end