Changeset 249
- Timestamp:
- 10/05/07 08:14:22 (1 year ago)
- Files:
-
- trunk/plugin/acts_as_ferret/lib/bulk_indexer.rb (modified) (1 diff)
- trunk/plugin/acts_as_ferret/lib/class_methods.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plugin/acts_as_ferret/lib/bulk_indexer.rb
r234 r249 17 17 def index_records(records, offset) 18 18 batch_time = measure_time { 19 records.each { |rec| @index << rec.to_doc if rec.ferret_enabled?(true)}19 records.each { |rec| @index << rec.to_doc } 20 20 }.to_f 21 21 @work_done = offset.to_f / @model_count * 100.0 if @model_count > 0 trunk/plugin/acts_as_ferret/lib/class_methods.rb
r248 r249 37 37 # re-index a number records specified by the given ids. Use for large 38 38 # indexing jobs i.e. after modifying a lot of records with Ferret disabled. 39 # Please note that the state of Ferret (enabled or disabled at class or 40 # record level) is not checked by this method, so if you need to do so 41 # (e.g. because of a custom ferret_enabled? implementation), you have to do 42 # so yourself. 39 43 def bulk_index(*ids) 40 44 options = Hash === ids.last ? ids.pop : {}
