es更新某个字段
Kibana 操作es更新字段1、_updatePOST /index_name/type/id/_update{"doc": {"column": "column_value"}}示例:POST /xxx_company/info/8fe6e9b2a9330862/_update{"doc": {"eps": {"value": 0,"value_usd": 0}}}2、_update_by_q
·
Kibana 操作es更新字段
1、_update
POST /index_name/type/id/_update
{
"doc": {
"column": "column_value"
}
}
示例:
POST /xxx_company/info/8fe6e9b2a9330862/_update
{
"doc": {
"eps": {
"value": 0,
"value_usd": 0
}
}
}
2、_update_by_query
POST index_name/_update_by_query
{
"query": {
"match": {
"条件": "8fe6e9b2a9330862"
}
},
"script": {
"source": "ctx._source['column'] = params['one']",
"params": {
"one": "修改后的值"
}
}
}
示例:
POST xxxx_company/_update_by_query
{
"query": {
"match": {
"_id": "8fe6e9b2a9330862"
}
},
"script": {
"source": "ctx._source['eps'] = params['one']",
"params": {
"one": {
"value": 1.0,
"value_usd": 1.1
}
}
}
}
更多推荐
已为社区贡献1条内容
所有评论(0)