在不讨论父子关系是否合适、能否避免的情况下,如何针对父子关系中,如何“同时”获取父子的详细数据呢?
看到github上的讨论:
https://github.com/elastic/ela ... s/761
看到github上的讨论:
https://github.com/elastic/ela ... s/761
By far the most efficient way of doing this is in two queries:
retrieve the top 10 parents matching the query
use an msearch to find (eg) the top 10 children for each parent id
While this requires two steps, it gives you all the flexibility you need which would otherwise have to be provided by adding new structures to the query dsl and to the response.
3 个回复
wushen
赞同来自: novia
https://www.elastic.co/guide/e ... .html
300斤的胖子
赞同来自:
dongchunfu - 80后IT 男
赞同来自: