简体   繁体   中英

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,
   }

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
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM