在Elasticsearch,我有以下数据:如何更新Elasticsearch索引中的特定字段?
"hits": [
{
"_index": "traffic",
"_type": "entry",
"_id": "922",
"_score": 1,
"_source": {
"Intensity": 0,
"tId": "9"
}
},
{
"_index": "traffic",
"_type": "entry",
"_id": "2812",
"_score": 1,
"_source": {
"Intensity": 0,
"tId": "28"
}
}
如何设置Intensity
ea¡qual至5 tId
等于28
?我应该写哪个更新查询?
但有可能根据'其中TID = 28'更新吗? – Dinosaurius
不,不是开箱即用的。你可以使用这个插件:https://github.com/yakaz/elasticsearch-action-updatebyquery –