在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 –