试试搜索一下吧

ES的父子查询中如何使用scripts的来过滤数据

Elasticsearch | 作者 cronous | 发布于2018年12月18日 | 阅读数:2143

ES的父子查询中如何使用scripts的来过滤数据
{
  "from": 0,
  "size": 10,
  "query": {
    "bool": {
      "filter": [
        {
          "has_child": {
               ......
            }
            "inner_hits":{}
          },
          "script" : {
             "lang": "painless",
             "script" : ""
            }
        }
      ]
      
    }
  
  }
}
已邀请:

rochy - rochy_he

赞同来自:

不一定需要脚本来过滤,对子文档的过滤可以使用 inner hits
可以参考官方文档:https://www.elastic.co/guide/e ... .html

要回复问题请先登录注册