Module: Keymaker::Indexing

Defined in:
lib/keymaker/indexing.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
# File 'lib/keymaker/indexing.rb', line 5

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#update_indicesObject



23
24
25
26
27
28
29
30
# File 'lib/keymaker/indexing.rb', line 23

def update_indices
  self.class.indices_traits.each do |index,traits|
    traits.each do |trait|
      neo_service.remove_node_from_index(index, trait[:index_key], send(trait[:value]), node_id)
      neo_service.add_node_to_index(index, trait[:index_key], send(trait[:value]), node_id)
    end
  end
end