# 根据索引和条件查找 GET lc_auth_user/_search { "query": { "bool": { "must": [ {"term": { "username.keyword": { "value": "admin" } }}, { "term": { "client_id.keyword": { "value": "39afcf51c44611ecae15fa163e7a6636" } } } ] } } } # 根
GET lc_auth_user/_search
{
"query": {
"bool": {
"must": [
{"term": {
"username.keyword": {
"value": "admin"
}
}},
{
"term": {
"client_id.keyword": {
"value": "39afcf51c44611ecae15fa163e7a6636"
}
}
}
]
}
}
}
# 根据索引查找
GET lc_auth_user/_search
{
"query": {
"bool": {
"must": [
]
}
}
}
# 新增/数据
POST /lc_auth_user/_doc/
{
"id": "2857da45-c1fc-11ec-ae15-fa163e7a6636",
"client_id": "39afcf51c44611ecae15fa163e7a6636",
"username": "admin",
"password": "85627950ec04548186a046c40dd8ecd78deae0e925550e627c7cfb6a0a7791ce",
"display_name": "admin",
"phone_no": "15286372141",
"email": null,
"org_id": null,
"expiry_date": "",
"password_expiry_date": "",
"account_status": 1,
"is_enable": 1,
"is_deleted": 0,
"create_time": "",
"update_time": ""
}
# 更新数据字段
POST /lc_auth_user/_doc/_update_by_query
{
"script": {
"inline": "ctx._source.account_status=params.account_status",
"lang": "painless",
"params": {
"account_status": 1
}
},
"query": {
"term": {
"id.keyword": "2857da45-c1fc-11ec-ae15-fa163e7a6636"
}
}
}
# 删除数据
DELETE /lc_auth_user/_doc/-j93loEBqhhXqkYRI3y1