GKr297
GKr297

Reputation: 195

How to update value from a document in elasticsearch through Kibana

POST /indexcn/doc/7XYIWHMB6jW2P6mpdcgv/_update
  {
    "doc" : {
    "DELIVERYDATE" : 100
  }
 }

I am trying to update the DELIVERYDATE from 0 to 100, but I am getting document missing exception. How to update the document with a new value?

Here is my index :

"hits" : [
  {
    "_index" : "indexcn",
    "_type" : "_doc",
    "_id" : "7XYIWHMB6jW2P6mpdcgv",
    "_score" : 1.0,
    "_source" : {
      .......
      .......   
      "DELIVERYDATE" : 0,
   }

Upvotes: 0

Views: 569

Answers (1)

Val
Val

Reputation: 217254

You actually got the mapping type wrong (doc instead of _doc). Try this and it will work:

           fix this
              |
              v
POST /indexcn/_doc/7XYIWHMB6jW2P6mpdcgv/_update
{
    "doc" : {
       "DELIVERYDATE" : 100
    }
}

Upvotes: 1

Related Questions