mirror of https://github.com/apache/lucene.git
Add yield to indexer, allowing client to have final control over the Solr document indexed after the mapping has been made
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@522532 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cd9862fceb
commit
ff396cac79
|
@ -18,8 +18,7 @@ class Solr::Indexer
|
|||
data_source.each do |record|
|
||||
document = mapper.map(record)
|
||||
|
||||
# yield(document) if block_given? # TODO: does yielding add value here? possibly to allow the caller
|
||||
# to manipulate the document outside of mappings just before indexing?
|
||||
yield(record, document) if block_given?
|
||||
|
||||
solr.add(document) unless options[:debug]
|
||||
puts document.inspect if options[:debug]
|
||||
|
|
Loading…
Reference in New Issue