💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
#### 多条件高级检索模板 > 多条件高级检索es语句,包含多个must、must\_not、should嵌套示例,并考虑nested对象的特殊检索 该模板适用于所有情况,尤其适用于侧边栏多级多条件联合查询 ``` ~~~ { "query": { "bool": { "must": [ { "match": { "title": "Science" } }, { "match": { "countryArea": "United States" } }, { "bool": { "should": [ { "match": { "sponsor": "National Science Foundation" } }, { "match": { "sponsor": "David and Lucile Packard Foundation" } } ], "minimum_should_match": 1 } }, { "bool": { "should": { "nested": { "path": "researchAreas", "query": { "bool": { "should": [ { "match": { "researchAreas.subjectName": "Arts and Humanities" } }, { "match": { "researchAreas.subjectName": "Ecology" } } ], "minimum_should_match": 1 } } } } } } ], "must_not": { "match": { "fundingType": "Program or Curriculum Development or Provision" } } } } } ~~~ [好文要](javascript:void(0);) ```