Elasticsearch技术解析与实战
上QQ阅读APP看书,第一时间看更新

1.5.6 修改文档

请求:POST http://127.0.0.1:9200/secisland/secilog/1/_update

参数:

{
  "doc": {
    "computer": "secisland"
    "message": "secisland is an security computer. It provides log analysis products !"
  }
}

返回值:

{
  "_index": "secisland" 
  "_type": "secilog" 
  "_id": "1" 
  "_version": 2 
  "_shards": {"total": 2 "successful": 1 "failed": 0}
}