使用 nohup 或 disown 如果你要让某个进程运行在后台。

parent-child模式,如何在搜索parent的时候把child一同搜出来?

Elasticsearch | 作者 v2me | 发布于2017年01月08日 | 阅读数:5304

已经看过 https://www.elastic.co/guide/e ... .html  以及 has_parent 模式以及 inner_hits。
现在可以做到搜索child,返回parent和匹配的child。
但都不能同时实现这个需求:
需要搜索parent, 匹配则同时得到child.

希望有懂的达人指导一下。
 多谢
 
已邀请:

IceDarron

赞同来自: zhangyufu

你说的那个效果是和 has_child 一样的么?
 has_child 查询允许我们返回基于在其 children 的数据上 parents 文档,has_parent 查询则是基于 parents 的数据返回 children。

要回复问题请先登录注册