# Couchdb\_changes gives Invalid FieldReference error when parsing couchdb which hosts couchapp

**URL:** <https://discuss.elastic.co/t/couchdb-changes-gives-invalid-fieldreference-error-when-parsing-couchdb-which-hosts-couchapp/214685>\
**Category:** Logstash\
**Created:** [January 10, 2020, 11:09pm UTC](https://discuss.elastic.co/t/couchdb-changes-gives-invalid-fieldreference-error-when-parsing-couchdb-which-hosts-couchapp/214685 "2020-01-10T23:09:21Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [January 13, 2020, 6:44pm UTC](https://discuss.elastic.co/t/couchdb-changes-gives-invalid-fieldreference-error-when-parsing-couchdb-which-hosts-couchapp/214685/5 "2020-01-13T18:44:25Z")

</div>

That is a [known issue](https://github.com/logstash-plugins/logstash-filter-json/issues/38). The [code](https://github.com/logstash-plugins/logstash-filter-json/blob/cf38d3036894af9ada7417aaf2b5f314dc277404/lib/logstash/filters/json.rb#L106) uses event.set and there is no way to stop event.set parsing field references.

If the set of offending keys is fixed you could mutate+gsub them. If it is dynamic then you would have to use a ruby filter (reusing code from the json filter) and iterate over the resulting keys to mutate them if needed before doing the event.set call.

---

_[View the full topic](https://discuss.elastic.co/t/couchdb-changes-gives-invalid-fieldreference-error-when-parsing-couchdb-which-hosts-couchapp/214685)._
