设置参数 `node.name` 可以自定义 Elasticsearch 节点的名字。 此条 Tips 由 medcl 贡献。

bool must的处理逻辑

Elasticsearch | 作者 ridethewind | 发布于2019年03月21日 | 阅读数:2126

{
    "query": {
        "bool":{
            "filter":{
               "bool":{
                 "must":[
                      {"match_phrase" : {  "text" :"123" }},
                       {"match_phrase" : {  "text" :"456" }}
                      ]
               }
            }
        }
    }
}




如上述的DSL所示,我需要查出即包含123,又包含456的
上述的语句的执行逻辑是先拿到123命中的再去过滤包含456的?还是拿到命中123和456的去取交集?

已邀请:

bellengao - 博客: https://www.jianshu.com/u/e0088e3e2127

赞同来自: ridethewind

哪个查询命中的文档少先执行哪个,在获取到的结果中再过滤出文档多的term

要回复问题请先登录注册