Skip to content

Commit

Permalink
Fix snippets
Browse files Browse the repository at this point in the history
One bad path and one missing file. This fixes the bad path and replaces
the missing file with `// AUTOSENSE` rather than overriding the file.
  • Loading branch information
nik9000 committed Oct 21, 2019
1 parent a8112fd commit a21b658
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion 054_Query_DSL/75_Combining_queries_together.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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` 查询。
8 changes: 4 additions & 4 deletions 300_Aggregations/65_percentiles.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ POST /website/logs/_bulk
{ "index": {}}
{ "latency" : 319, "zone" : "EU", "timestamp" : "2014-10-29" }
----
// SENSE: 300_Aggregations/65_percentiles.json
// AUTOSENSE

数据有三个值:延时、数据中心的区域以及时间戳。让我们对数据全集进行 _百分位_ 操作以获得数据分布情况的直观感受:

Expand All @@ -84,7 +84,7 @@ GET /website/logs/_search
}
}
----
// SENSE: 300_Aggregations/65_percentiles.json
// AUTOSENSE
<1> `percentiles` 度量被应用到 +latency+ 延时字段。
<2> 为了比较,我们对相同字段使用 `avg` 度量。

Expand Down Expand Up @@ -142,7 +142,7 @@ GET /website/logs/_search
}
}
----
// SENSE: 300_Aggregations/65_percentiles.json
// AUTOSENSE
<1> 首先根据区域我们将延时分到不同的桶中。
<2> 再计算每个区域的百分位数值。
<3> +percents+ 参数接受了我们想返回的一组百分位数,因为我们只对长的延时感兴趣。
Expand Down Expand Up @@ -226,7 +226,7 @@ GET /website/logs/_search
}
}
----
// SENSE: 300_Aggregations/65_percentiles.json
// AUTOSENSE
<1> `percentile_ranks` 度量接受一组我们希望分级的数值。

在聚合运行后,我们能得到两个值:
Expand Down

0 comments on commit a21b658

Please sign in to comment.