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

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:

{'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:

{ 
        "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

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