Module: Chewy::Type::Actions::ClassMethods
- Defined in:
- lib/chewy/type/actions.rb
Instance Method Summary collapse
-
#journal ⇒ Chewy::Journal
A Journal instance for the particular type.
-
#reset ⇒ true, false
Deletes all documents of a type and reimports them.
-
#sync(parallel: nil) ⇒ Hash{Symbol, Object}?
Performs missing and outdated objects synchronization for the current type.
Instance Method Details
#journal ⇒ Chewy::Journal
A Journal instance for the particular type
37 38 39 |
# File 'lib/chewy/type/actions.rb', line 37 def journal @journal ||= Chewy::Journal.new(self) end |
#reset ⇒ true, false
Deletes all documents of a type and reimports them
15 16 17 18 |
# File 'lib/chewy/type/actions.rb', line 15 def reset delete_all import end |
#sync(parallel: nil) ⇒ Hash{Symbol, Object}?
Performs missing and outdated objects synchronization for the current type.
28 29 30 31 32 |
# File 'lib/chewy/type/actions.rb', line 28 def sync(parallel: nil) syncer = Syncer.new(self, parallel: parallel) count = syncer.perform {count: count, missing: syncer.missing_ids, outdated: syncer.outdated_ids} if count end |