并且或
index/_search
{
"query": {
"bool": {
"must": [
{
"term": {
"storeId": {
"value": 2
}
}
}
],
"should": [
{
"match": {
"title": "答题技巧"
}
},{
"match": {
"title": "常见问题解答"
}
}
]
}
}
}
//更新一条数据
POST /index/_update_by_query
{
"query": {
"term": {
"_id": "b43d71d7ed6740ff9615885bae5f9e64"
}
},
"script": {
"lang": "painless",
"source": "ctx._source.id = params.id",
"params": {
"id": "b43d71d7ed6740ff9615885bae5f9e64"
}
}
}