Skip to content

Commit

Permalink
Update 33_Nested_sorting.asciidoc (elasticsearch-cn#520)
Browse files Browse the repository at this point in the history
  • Loading branch information
CindyChn authored and medcl committed Dec 26, 2017
1 parent 265f103 commit 79a574d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 402_Nested/33_Nested_sorting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ GET /_search
<3> 排序子句中的 `nested_path` 和 `nested_filter` 和 `query` 子句中的 `nested` 查询相同,原因在下面有解释。

我们为什么要用 nested_path 和 nested_filter 重复查询条件呢?原因在于,排序发生在查询执行之后。
查询条件限定了只在10月份收到评论的博客文档,但返回整个博客文档。如果我们不在排序子句中加入 `nested_filter` ,
查询条件限定了在10月份收到评论的博客文档,但返回的是博客文档。如果我们不在排序子句中加入 `nested_filter` ,
那么我们对博客文档的排序将基于博客文档的所有评论,而不是仅仅在10月份接收到的评论。

0 comments on commit 79a574d

Please sign in to comment.