# Failed to parse field \[data\] of type \[text\]

**URL:** https://discuss.elastic.co/t/failed-to-parse-field-data-of-type-text/369325
**Category:** Logstash
**Created:** [October 24, 2024, 6:56am UTC](https://discuss.elastic.co/t/failed-to-parse-field-data-of-type-text/369325 "2024-10-24T06:56:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![zerratriani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zerratriani/32/113308_2.png) [@zerratriani](https://discuss.elastic.co/u/zerratriani)
#### Post date: [October 24, 2024, 6:56am UTC](https://discuss.elastic.co/t/failed-to-parse-field-data-of-type-text/369325/1 "2024-10-24T06:56:37Z")

</div>

Hi i have some issue, i find this error in logstash-plain.log how to solve it?

"error"=\>{"type"=\>"document\_parsing\_exception", "reason"=\>"[1:2532] failed to parse field [data] of type [text] in document with id 'f-6ZvJIBLVE9MTub84Ab'. Preview of field's value: '{amount=xxxxxx, codeProduct=xxxxxx, sourceAccount=xxxxxx, reffBiller=xxxxxxx, branchName=UPC xxxxxx, reffSwitching=xxxxxxxx, userName=x Y x, userId=xxxxxx, responseCode=xxxxx, branchCode=xxxx, responseDesc=Approved, codeBiller=xxxx, beneficiaryAccount=xxxxxxx, kodeDisbursal=xxxxxxxxx, receipt=, currency=USH, timestamp=2024-10-24 10:37:30}'", "caused\_by"=\>{"type"=\>"illegal\_state\_exception", "reason"=\>"Can't get text on a START\_OBJECT at 1:2076"}}}}}

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [October 24, 2024, 7:25am UTC](https://discuss.elastic.co/t/failed-to-parse-field-data-of-type-text/369325/2 "2024-10-24T07:25:06Z")

</div>

You need to change the mapping in elasticsearch and set data as an object and not a text.

---

<div class="post-metadata">

### Author: ![Rick\_V](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rick_v/32/131683_2.png) [@Rick\_V](https://discuss.elastic.co/u/Rick_V)
#### Post date: [October 28, 2024, 4:19pm UTC](https://discuss.elastic.co/t/failed-to-parse-field-data-of-type-text/369325/3 "2024-10-28T16:19:00Z")

</div>

Make sure it is following an Elastic recognized date format or specify a custom format in your mapping as following: [Date field type | Elasticsearch Guide [8.15] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html#multiple-date-formats)
