elasticsearch 更新文档的坑

POST cnbeta/doc/cUxO42oB9O-zF2ru-rs-/_update
{
"doc":{
"title":"中国操作系统"
}
}
 

那个body里面的”doc" 不能少
不然会报错:
 
{
    "error": {
        "root_cause": [
            {
                "type": "action_request_validation_exception",
                "reason": "Validation Failed: 1: script or doc is missing;"
            }
        ],
        "type": "action_request_validation_exception",
        "reason": "Validation Failed: 1: script or doc is missing;"
    },
    "status": 400
}

0 个评论

要回复文章请先登录注册