elasticsearch 全文搜素 query_string 搭配其他条件
{
"query": {
"bool": {
"must": [
{
"term": {
"item_type": "question"
}
},
{
"query_string": {
"query": "*hello*",
"fields": [
"name",
"topic",
"item_type",
"create_user",
"A.user",
"B.remark",
"C.D.*"
],
"default_operator": "or"
}
},
{
"range": {
"created_at": {
"gte": "2023-12-23T14:33:32",
"lte": "2024-06-20T14:33:32"
}
}
}
]
}
},
"sort": {
"created_at": {
"order": "desc"
}
},
"from": 0,
"size": 100
}
标签:string,33,32,elasticsearch,user,搜素,query,type
From: https://blog.csdn.net/chechenshi/article/details/139832281