lib/sunspot/indexer.rb in sunspot-0.9.8 vs lib/sunspot/indexer.rb in sunspot-0.10.0
- old
+ new
@@ -47,13 +47,19 @@
#
def remove_all(clazz)
@connection.delete_by_query("type:#{escape(clazz.name)}")
end
+ #
+ # Start batch processing
+ #
def start_batch
@batch = []
end
+ #
+ # Write batch out to Solr and clear it
+ #
def flush_batch
add_documents(@batch)
@batch = nil
end