lib/logstash/inputs/elasticsearch.rb in logstash-input-elasticsearch-4.0.6 vs lib/logstash/inputs/elasticsearch.rb in logstash-input-elasticsearch-4.1.0

- old
+ new

@@ -168,11 +168,10 @@ {'has_hits' => r['hits']['hits'].any?, '_scroll_id' => r['_scroll_id']} end def push_hit(hit, output_queue) event = LogStash::Event.new(hit['_source']) - decorate(event) if @docinfo # do not assume event[@docinfo_target] to be in-place updatable. first get it, update it, then at the end set it in the event. docinfo_target = event.get(@docinfo_target) || {} @@ -187,9 +186,11 @@ docinfo_target[field] = hit[field] end event.set(@docinfo_target, docinfo_target) end + + decorate(event) output_queue << event end def scroll_request scroll_id