Skip to content

Commit 712085a

Browse files
weiqiangyuanmedcl
authored andcommitted
chapter43_part5: /404_Parent_Child/60_Children_agg.asciidoc (#278)
* 完成Parent-Child第5部分的翻译 * revise according comment
1 parent 6e64048 commit 712085a

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

404_Parent_Child/60_Children_agg.asciidoc

+7-12
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
[[children-agg]]
2-
=== Children Aggregation
2+
=== 子文档聚合
33

4-
Parent-child supports a
5-
http://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-children-aggregation.html[`children` aggregation] as ((("aggregations", "children aggregation")))((("children aggregation")))((("parent-child relationship", "children aggregation")))a direct analog to the `nested` aggregation discussed in
6-
<<nested-aggregation>>. A parent aggregation (the equivalent of
7-
`reverse_nested`) is not supported.
8-
9-
This example demonstrates how we could determine the favorite hobbies of our
10-
employees by country:
4+
在父-子文档中支持
5+
http://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-children-aggregation.html[子文档聚合],这一点和((("aggregations", "children aggregation")))((("children aggregation")))((("parent-child relationship", "children aggregation"))) <<nested-aggregation>> 类似。但是,对于父文档的聚合查询是不支持的(和 `reverse_nested` 类似)。
116

7+
我们通过下面的例子来演示按照国家维度查看最受雇员欢迎的业余爱好:
128
[source,json]
139
-------------------------
1410
GET /company/branch/_search
@@ -37,7 +33,6 @@ GET /company/branch/_search
3733
}
3834
}
3935
-------------------------
40-
<1> The `country` field in the `branch` documents.
41-
<2> The `children` aggregation joins the parent documents with
42-
their associated children of type `employee`.
43-
<3> The `hobby` field from the `employee` child documents.
36+
<1> `country` 是 `branch` 文档的一个字段。
37+
<2> 子文档聚合查询通过 `employee` type 的子文档将其父文档聚合在一起。
38+
<3> `hobby` 是 `employee` 子文档的一个字段。

0 commit comments

Comments
 (0)