# Mapper\_parsing\_exception error

**URL:** <https://discuss.elastic.co/t/mapper-parsing-exception-error/334447>\
**Category:** Elasticsearch\
**Created:** [May 26, 2023, 3:01pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception-error/334447 "2023-05-26T15:01:07Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [May 26, 2023, 7:11pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception-error/334447/3 "2023-05-26T19:11:56Z")

</div>

Here is a little further explanation of what is happening

> [@Logstash Parser error - tried to parse field as object, but found a concrete value](https://discuss.elastic.co/t/logstash-parser-error-tried-to-parse-field-as-object-but-found-a-concrete-value/269140/4):
>
> Try this test, hopefully this makes it clearer POST test/\_doc { "myfield" : "myvalue", "myotherfield" : { "mysubfield1" : "mysubvalue1", "mysubfield2" : "mysubvalue2" } } Then Post POST test/\_doc { "myfield" : "myvalue", "myotherfield" : "myconcretevalue" } and you will get this error. { "error" : { "root\_cause" : [{ "type" : "mapper\_parsing\_exception", "reason" : "object mapping for [myotherfield] tried to parse field [myotherfield] as objec…

And Here is a sample code how you might fix something like this with an ingest pipeline.

> [@Field with different types on same index](https://discuss.elastic.co/t/field-with-different-types-on-same-index/315047/5):
>
> Just in case you are interest here is a sample ingest pipeline / simulate with various combinations ## Ingest Pipeline Concrete / Object POST \_ingest/pipeline/\_simulate { "pipeline": { "processors": [{ "rename": { "if": "ctx?.notes instanceof String", "field": "notes", "target\_field": "notes.value", "ignore\_failure": false } }] }, "docs": [ { "\_source": { "id": "8f22efb2-6a2a-4cb7-9d0b-01ca0d6…

---

_[View the full topic](https://discuss.elastic.co/t/mapper-parsing-exception-error/334447)._
