使用join查询,现查询子文档,结果都是子文档,然后数据需要从子文档相应的父文档取几个字段,
问怎么返回子文档对应的父文档呢?
 
 
 
															
																				问怎么返回子文档对应的父文档呢?
GET /my-index/_search
{
  "query": {
      "parent_id": {
          "type": "my-child",
          "id": "1"
      }
  }
}
 
	
2 个回复
laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net
赞同来自: hubiao
hubiao
赞同来自: