app/models/spotlight/resource.rb in blacklight-spotlight-0.7.1 vs app/models/spotlight/resource.rb in blacklight-spotlight-0.7.2
- old
+ new
@@ -72,10 +72,10 @@
return [] if data.blank?
data &&= [data] if data.is_a? Hash
return to_enum(:documents_to_index) { data.size } unless block_given?
- data.reject(&:blank?).each do |doc|
+ data.lazy.reject(&:blank?).each do |doc|
yield doc.reverse_merge(existing_solr_doc_hash(doc[unique_key]) || {})
end
end
private