Elasticsearch同时实现and与or查询
{ "query": { "bool": { "must": [{ "match_phrase": { "type_id": 123 } }], "should": [{ "match_phrase": { "title": "常德" } }, { "match_phrase": { "content": "常德" } }], "minimum_should_match": 1 } }, "size": 5 }
{ "query": { "bool": { "must": [{ "match_phrase": { "type_id": 123 } }], "should": [{ "match_phrase": { "title": "常德" } }, { "match_phrase": { "content": "常德" } }], "minimum_should_match": 1 } }, "size": 5 }
版权所有 © 2022 沅来是澧
如果有程序开发、网站建设等需求的请联系我,QQ:47419233