# Unable to create new document/event in logstash Ruby filter using yield

**URL:** <https://discuss.elastic.co/t/unable-to-create-new-document-event-in-logstash-ruby-filter-using-yield/236995>\
**Category:** Logstash\
**Created:** [June 13, 2020, 7:49pm UTC](https://discuss.elastic.co/t/unable-to-create-new-document-event-in-logstash-ruby-filter-using-yield/236995 "2020-06-13T19:49:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Jenni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jenni/32/29684_2.png) [@Jenni](https://discuss.elastic.co/u/Jenni)\
**Post date:** [June 15, 2020, 10:48am UTC](https://discuss.elastic.co/t/unable-to-create-new-document-event-in-logstash-ruby-filter-using-yield/236995/2 "2020-06-15T10:48:48Z")

</div>

Your code says `yeild`, not `yield`. But that shoudn't even be necessary, as `new_event_block.call(generated)` should send the new event already: [https://www.elastic.co/guide/en/logstash/current/plugins-filters-ruby.html#\_inline\_ruby\_code](https://www.elastic.co/guide/en/logstash/current/plugins-filters-ruby.html#_inline_ruby_code) (I've done that myself in the past without `yield`)

---

_[View the full topic](https://discuss.elastic.co/t/unable-to-create-new-document-event-in-logstash-ruby-filter-using-yield/236995)._
