Updating Elasticsearch Document

I am running into trouble when I try to update a field within my document.

Here's my JSON call:

    POST vs-users/_update/bwMNiyZZMg4jZVMdueaZ6m
    {
      "name": "abc"
    }

I get this error:

    {
      "error" : {
        "root_cause" : [
          {
            "type" : "x_content_parse_exception",
            "reason" : "[2:3] [UpdateRequest] unknown field [name]"
          }
        ],
        "type" : "x_content_parse_exception",
        "reason" : "[2:3] [UpdateRequest] unknown field [name]"
      },
      "status" : 400
    }

'name' is a field name in my index, what can I do to resolve this? Thanks!

I was able to resolve this by doing the following:

{
  "doc": {
    "name": "abc"
  }
}

Thanks!

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