# \[UpdateRequest\] failed to parse field \[doc\] while trying to update some fields

**URL:** <https://discuss.elastic.co/t/updaterequest-failed-to-parse-field-doc-while-trying-to-update-some-fields/234509>\
**Category:** Elasticsearch\
**Created:** [May 27, 2020, 9:53am UTC](https://discuss.elastic.co/t/updaterequest-failed-to-parse-field-doc-while-trying-to-update-some-fields/234509 "2020-05-27T09:53:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moreno17](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moreno17/32/50275_2.png) [@Moreno17](https://discuss.elastic.co/u/Moreno17)\
**Post date:** [May 27, 2020, 9:53am UTC](https://discuss.elastic.co/t/updaterequest-failed-to-parse-field-doc-while-trying-to-update-some-fields/234509/1 "2020-05-27T09:53:06Z")

</div>

Hi all, I am new with elasticsearch and I am trying to update a document that I have inserted before. The problem is that I had this error and I don't know what I am doing wrong:

```auto
{'error': {'root_cause': [{'type': 'x_content_parse_exception', 'reason': '[3:17] [UpdateRequest] failed to parse field [doc]'}], 'type': 'x_content_parse_exception', 'reason': '[3:17] [UpdateRequest] failed to parse field [doc]', 'caused_by': {'type': 'json_e_o_f_exception', 'reason': 'Unexpected end-of-input in field name\n at [Source: (org.elasticsearch.transport.netty4.ByteBufStreamInput); line: 4, column: 24]'}}, 'status': 400}

```

I am using POST on this URL: `http://localhost:9200/restaurantes/_update/4`

And the body is:

```auto
{ 
        "doc" : { 
            "dirección" : "Calle Juan Ramón Jiménez 5. Jaén, España", 
            "cp" : 23001 
        } 
}

```

As you can see is a really simple update but something is wrong.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 24, 2020, 9:54am UTC](https://discuss.elastic.co/t/updaterequest-failed-to-parse-field-doc-while-trying-to-update-some-fields/234509/2 "2020-06-24T09:54:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
