Module: Hari::Node::Repository
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#reindex(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/hari/node/repository.rb', line 6 def reindex( = {}) self.class.indexed_properties.each do |property| if change = previous_changes[property.name] previous, current = change Index.new(property, previous).delete self Index.new(property, current).add self elsif [:force_index] value = send(property.name) Index.new(property, value).add self end end end |