在弹性搜索5.6中考虑以下文档
"_index" : "comp",
"_type" : "employee",
"_id" : "1",
"_score" : 1.0,
"_source" : {
"name":"tanmay",
"eid":"e01",
"address":"ram bagh",
"salary":"2000",
"rating":"5"
}
"_index" : "comp",
"_type" : "employee",
"_id" : "2",
"_score" : 1.0,
"_source" : {
"name":"tanmay",
"eid":"e01",
"address":"ram bagh",
"salary":"1000",
"rating":"3"
}
"_index" : "comp",
"_type" : "employee",
"_id" : "3",
"_score" : 1.0,
"_source" : {
"name":"tanmay",
"eid":"e03",
"address":"ram bagh",
"salary":"500",
"rating":"1"
}
Index = comp和type = employee
在这里,我想将所有员工的工资更新为5000,其中评级> 2
如何使用JEST API在弹性搜索中执行此操作
在RDBMS中,我们可以使用此查询“update employee set salary = 5000 where rating> 2”
那么什么是弹性搜索JEST API的等效查询