//删除一条数据
POST nm_table/_delete_by_query
{
"query":{
"term":{
"_id":"1442349529667080192"
}
}
}
//删除所有数据
POST nm_table/_delete_by_query
{
"query":{
"match_all": {}
}
}
//更新数据
POST nm_table/_update/1439450426750668800?refresh=true
{
"doc": {
"task_t1_day": "2021-10-09"
}
}
//条件更新
POST nm_table/_update_by_query
{
"script": {
"source": "ctx._source['assess_result']='1';"
},
"query":{
"bool": {
"must":{
"match":{
"obj_county_id":"120116"
}
}
}
}
}
//使用sql语句查询es
POST /_xpack/sql?format=json
{
"query":"select COUNT(0) count from table_name where id= 165"
}