From a21b658e8877b24d7798580f01785440625f4143 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Mon, 21 Oct 2019 14:58:37 -0400 Subject: [PATCH] Fix snippets One bad path and one missing file. This fixes the bad path and replaces the missing file with `// AUTOSENSE` rather than overriding the file. --- 054_Query_DSL/75_Combining_queries_together.asciidoc | 2 +- 300_Aggregations/65_percentiles.asciidoc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/054_Query_DSL/75_Combining_queries_together.asciidoc b/054_Query_DSL/75_Combining_queries_together.asciidoc index 3b3a69a54..177f91dd4 100644 --- a/054_Query_DSL/75_Combining_queries_together.asciidoc +++ b/054_Query_DSL/75_Combining_queries_together.asciidoc @@ -114,6 +114,6 @@ TIP: 如果没有 `must` 语句,那么至少需要能够匹配其中的一条 } } -------------------------------------------------- -// SENSE: 054_Query_DSL/70_bool_query.json +// SENSE: 054_Query_DSL/70_Bool_query.json <1> `term` 查询被放置在 `constant_score` 中,转成不评分的 filter。这种方式可以用来取代只有 filter 语句的 `bool` 查询。 diff --git a/300_Aggregations/65_percentiles.asciidoc b/300_Aggregations/65_percentiles.asciidoc index f5173b4a7..9790860ce 100644 --- a/300_Aggregations/65_percentiles.asciidoc +++ b/300_Aggregations/65_percentiles.asciidoc @@ -61,7 +61,7 @@ POST /website/logs/_bulk { "index": {}} { "latency" : 319, "zone" : "EU", "timestamp" : "2014-10-29" } ---- -// SENSE: 300_Aggregations/65_percentiles.json +// AUTOSENSE 数据有三个值:延时、数据中心的区域以及时间戳。让我们对数据全集进行 _百分位_ 操作以获得数据分布情况的直观感受: @@ -84,7 +84,7 @@ GET /website/logs/_search } } ---- -// SENSE: 300_Aggregations/65_percentiles.json +// AUTOSENSE <1> `percentiles` 度量被应用到 +latency+ 延时字段。 <2> 为了比较,我们对相同字段使用 `avg` 度量。 @@ -142,7 +142,7 @@ GET /website/logs/_search } } ---- -// SENSE: 300_Aggregations/65_percentiles.json +// AUTOSENSE <1> 首先根据区域我们将延时分到不同的桶中。 <2> 再计算每个区域的百分位数值。 <3> +percents+ 参数接受了我们想返回的一组百分位数,因为我们只对长的延时感兴趣。 @@ -226,7 +226,7 @@ GET /website/logs/_search } } ---- -// SENSE: 300_Aggregations/65_percentiles.json +// AUTOSENSE <1> `percentile_ranks` 度量接受一组我们希望分级的数值。 在聚合运行后,我们能得到两个值: