app/models/concerns/spotlight/solr_document/atomic_updates.rb in blacklight-spotlight-3.0.0.rc4 vs app/models/concerns/spotlight/solr_document/atomic_updates.rb in blacklight-spotlight-3.0.0.rc5
- old
+ new
@@ -3,15 +3,15 @@
module Spotlight
module SolrDocument
##
# Solr indexing strategy using Solr's Atomic Updates
module AtomicUpdates
- def reindex
+ def reindex(update_params: { commitWithin: 500 })
return unless write?
data = hash_for_solr_update(to_solr)
- blacklight_solr.update params: { commitWithin: 500 }, data: data.to_json, headers: { 'Content-Type' => 'application/json' } unless data.empty?
+ blacklight_solr.update params: update_params, data: data.to_json, headers: { 'Content-Type' => 'application/json' } unless data.empty?
end
def write?
Spotlight::Engine.config.writable_index
end