只更新Elasticsearch中的特定字段值 [英] Update only specific field value in elasticsearch
本文介绍了只更新Elasticsearch中的特定字段值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在Elasticsearch中更新某些特定字段的值而不会覆盖其他字段。 ?
Is it possible to update some specific fields value in elasticsearch with out overwriting other fields. ?
推荐答案
作为对此答案的基于代码的贡献,可以使用以下查询:
As a codebased contribution to this answer, the following query may be used:
POST /index/type/100100471/_update
{
"doc" : {
"yourProperty" : 10000
}
}
此查询更新 yourProperty
仅属性。
因此,此响应出现:
{
"_index": "index",
"_type": "type",
"_id": "100100471",
"_version": 1,
"_shards": {
"total": 0,
"successful": 1,
"failed": 0
}
}
这篇关于只更新Elasticsearch中的特定字段值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文