diff --git a/052_Mapping_Analysis/40_Analysis.asciidoc b/052_Mapping_Analysis/40_Analysis.asciidoc index 655b19e6c..1f3c4923f 100644 --- a/052_Mapping_Analysis/40_Analysis.asciidoc +++ b/052_Mapping_Analysis/40_Analysis.asciidoc @@ -155,7 +155,7 @@ GET /_analyze -------------------------------------------------- `token` 是实际存储到索引中的词条。 `position` 指明词条在原始文本中出现的位置。 `start_offset` 和 `end_offset` 指明字符在原始字符串中的位置。 -TIP: ((("types", "type values returned by analyzers")))每个分析器的 `type` 值都不一样,可以忽略它们。它们在Elasticsearch中的唯一作用在于{ref}/analysis-keep-types-tokenfilter.html[`keep_types` token 过滤器]。 +TIP: ((("types", "type values returned by analyzers")))每个分析器的 `type` 值都不一样,可以忽略它们。它们在Elasticsearch中的唯一作用在于​{ref}/analysis-keep-types-tokenfilter.html[`keep_types` token 过滤器]​。 `analyze` API 是一个有用的工具,它有助于我们理解Elasticsearch索引内部发生了什么,随着深入,我们会进一步讨论它。 diff --git a/230_Stemming/10_Algorithmic_stemmers.asciidoc b/230_Stemming/10_Algorithmic_stemmers.asciidoc index b96fad072..c5c64aa97 100644 --- a/230_Stemming/10_Algorithmic_stemmers.asciidoc +++ b/230_Stemming/10_Algorithmic_stemmers.asciidoc @@ -16,7 +16,7 @@ Elasticsearch 中的大部分 stemmers (词干提取器)是基于算法的 ==== 使用基于算法的词干提取器 -你((("stemming words", "algorithmic stemmers", "using")))可以使用 {ref}/analysis-porterstem-tokenfilter.html[`porter_stem`] 词干提取器或直接使用 {ref}/analysis-kstem-tokenfilter.html[`kstem`] 分词过滤器,或使用 {ref}/analysis-snowball-tokenfilter.html[`snowball`] 分词过滤器创建一个具体语言的 Snowball 词干提取器。所有基于算法的词干提取器都暴露了用来接受 `语言` 参数的统一接口: {ref}/analysis-stemmer-tokenfilter.html[`stemmer` token filter] 。 +你((("stemming words", "algorithmic stemmers", "using")))可以使用 ​{ref}/analysis-porterstem-tokenfilter.html[`porter_stem`]​ 词干提取器或直接使用 {ref}/analysis-kstem-tokenfilter.html[`kstem`] 分词过滤器,或使用 {ref}/analysis-snowball-tokenfilter.html[`snowball`] 分词过滤器创建一个具体语言的 Snowball 词干提取器。所有基于算法的词干提取器都暴露了用来接受 `语言` 参数的统一接口: {ref}/analysis-stemmer-tokenfilter.html[`stemmer` token filter] 。 例如,假设你发现 `英语` 分析器使用的默认词干提取器太激进并且((("english analyzer", "default stemmer, examining")))你想使它不那么激进。首先应在 {ref}/analysis-lang-analyzer.html[language analyzers] 查看 `英语` 分析器配置文件,配置文件展示如下: @@ -64,7 +64,7 @@ Elasticsearch 中的大部分 stemmers (词干提取器)是基于算法的 重新审视下现在的配置,添加上以下修改,我们可以把这份配置当作新分析器的基本配置: -* 修改 `english_stemmer` ,将 `english` ({ref}/analysis-porterstem-tokenfilter.html[`porter_stem`] 分词过滤器的映射)替换为 `light_english` (非激进的 {ref}/analysis-kstem-tokenfilter.html[`kstem`] 分词过滤器的映射)。 +* 修改 `english_stemmer` ,将 `english` (​{ref}/analysis-porterstem-tokenfilter.html[`porter_stem`]​ 分词过滤器的映射)替换为 `light_english` (非激进的 {ref}/analysis-kstem-tokenfilter.html[`kstem`] 分词过滤器的映射)。 * 添加 <> 分词过滤器用以移除外语的附加符号。((("asciifolding token filter"))) diff --git a/230_Stemming/40_Choosing_a_stemmer.asciidoc b/230_Stemming/40_Choosing_a_stemmer.asciidoc index 723779959..e81ae1b99 100644 --- a/230_Stemming/40_Choosing_a_stemmer.asciidoc +++ b/230_Stemming/40_Choosing_a_stemmer.asciidoc @@ -8,7 +8,7 @@ `english`:: - {ref}/analysis-porterstem-tokenfilter.html[`porter_stem`] 语汇单元过滤器(token filter)。 + {ref}/analysis-porterstem-tokenfilter.html[`porter_stem`]​ 语汇单元过滤器(token filter)。 `light_english`:: diff --git a/230_Stemming/50_Controlling_stemming.asciidoc b/230_Stemming/50_Controlling_stemming.asciidoc index a3d39148b..d9b80c009 100644 --- a/230_Stemming/50_Controlling_stemming.asciidoc +++ b/230_Stemming/50_Controlling_stemming.asciidoc @@ -20,7 +20,7 @@ 来标记这些词语列表为 _keywords_ ,用来阻止后续的词干提取过滤器来触碰这些词语。((("keyword_marker token filter", "preventing stemming of certain words"))) 例如,我们创建一个简单自定义分析器,使用 -{ref}/analysis-porterstem-tokenfilter.html[`porter_stem`] 语汇单元过滤器,同时阻止 `skies` 的词干提取:((("porter_stem token filter"))) +{ref}/analysis-porterstem-tokenfilter.html[`porter_stem`]​ 语汇单元过滤器,同时阻止 `skies` 的词干提取:((("porter_stem token filter"))) [source,json] ------------------------------------------ diff --git a/240_Stopwords/20_Using_stopwords.asciidoc b/240_Stopwords/20_Using_stopwords.asciidoc index df26abd77..252c56824 100644 --- a/240_Stopwords/20_Using_stopwords.asciidoc +++ b/240_Stopwords/20_Using_stopwords.asciidoc @@ -1,7 +1,7 @@ [[using-stopwords]] === 使用停用词 -移除停用词的工作是由 `stop` 停用词过滤器完成的,可以通过创建自定义的分析器来使用它(参见 使用停用词过滤器{ref}/analysis-stop-tokenfilter.html[`stop` 停用词过滤器])。但是,也有一些自带的分析器预置使用停用词过滤器: +移除停用词的工作是由 `stop` 停用词过滤器完成的,可以通过创建自定义的分析器来使用它(参见 使用停用词过滤器​{ref}/analysis-stop-tokenfilter.html[`stop` 停用词过滤器]​)。但是,也有一些自带的分析器预置使用停用词过滤器: {ref}/analysis-lang-analyzer.html[语言分析器]:: @@ -95,7 +95,7 @@ The quick and the dead --------------------------------- TIP: -Elasticsearch 中预定义的与语言相关的停用词列表可以在文档(("languages", "predefined stopword lists for"))){ref}/analysis-stop-tokenfilter.html[`stop` 停用词过滤器] 中找到。 +Elasticsearch 中预定义的与语言相关的停用词列表可以在文档(("languages", "predefined stopword lists for")))​{ref}/analysis-stop-tokenfilter.html[`stop` 停用词过滤器]​ 中找到。 停用词可以通过指定一个特殊列表 `_none_` 来禁用。例如,使用 `_english_` 分析器而不使用停用词,可以通过以下方式做到: @@ -141,7 +141,7 @@ PUT /my_index [[stop-token-filter]] ==== 使用停用词过滤器(Using the stop Token Filter) -当你创建 `custom` 分析器时候,可以组合多个 {ref}/analysis-stop-tokenfilter.html[`stop` 停用词过滤器] 分词器((("stopwords", "using stop token filter")))((("stop token filter", "using in custom analyzer")))。例如:我们想要创建一个西班牙语((("Spanish", "custom analyzer for")))((("light_spanish stemmer")))的分析器: +当你创建 `custom` 分析器时候,可以组合多个 ​{ref}/analysis-stop-tokenfilter.html[`stop` 停用词过滤器]​ 分词器((("stopwords", "using stop token filter")))((("stop token filter", "using in custom analyzer")))。例如:我们想要创建一个西班牙语((("Spanish", "custom analyzer for")))((("light_spanish stemmer")))的分析器: * 自定义停用词列表 * `light_spanish` 词干提取器 @@ -192,7 +192,7 @@ PUT /my_index 想要更新分析器的停用词列表有多种方式,((("analyzers", "stopwords list, updating")))((("stopwords", "updating list used by analyzers"))) 分析器在创建索引时,当集群节点重启时候,或者关闭的索引重新打开的时候。 -如果你使用 `stopwords` 参数以内联方式指定停用词,那么你只能通过关闭索引,更新分析器的配置{ref}/indices-update-settings.html#update-settings-analysis[update index settings API],然后在重新打开索引才能更新停用词。 +如果你使用 `stopwords` 参数以内联方式指定停用词,那么你只能通过关闭索引,更新分析器的配置​{ref}/indices-update-settings.html#update-settings-analysis[update index settings API]​,然后在重新打开索引才能更新停用词。 如果你使用 `stopwords_path` 参数指定停用词的文件路径((("stopwords_path parameter"))) ,那么更新停用词就简单了。你只需更新文件(在每一个集群节点上),然后通过两者之中的任何一个操作来强制重新创建分析器: diff --git a/410_Scaling/55_Retiring_data.asciidoc b/410_Scaling/55_Retiring_data.asciidoc index 6559f8694..005d47e5e 100644 --- a/410_Scaling/55_Retiring_data.asciidoc +++ b/410_Scaling/55_Retiring_data.asciidoc @@ -74,7 +74,7 @@ POST /logs_2014-09-30/_settings { "number_of_replicas": 1 } ------------------------- -当然,没有副本我们将面临磁盘故障而导致丢失数据的风险。你可能想要先通过((("snapshot-restore API"))){ref}/modules-snapshots.html[`snapshot-restore` API]备份数据。 +当然,没有副本我们将面临磁盘故障而导致丢失数据的风险。你可能想要先通过((("snapshot-restore API")))​{ref}/modules-snapshots.html[`snapshot-restore` API]​备份数据。 [[close-indices]] ==== 关闭旧索引 @@ -99,5 +99,5 @@ POST /logs_2014-01-*/_open <3> [[archive-indices]] ==== 归档旧索引 -最后,非常旧的索引((("indices", "archiving old indices")))可以通过{ref}/modules-snapshots.html[`snapshot-restore` API]归档至长期存储例如共享磁盘或者 Amazon S3,以防日后你可能需要访问它们。 +最后,非常旧的索引((("indices", "archiving old indices")))可以通过​{ref}/modules-snapshots.html[`snapshot-restore` API]​归档至长期存储例如共享磁盘或者 Amazon S3,以防日后你可能需要访问它们。 当存在备份时我们就可以将索引从集群中删除了。 diff --git a/410_Scaling/80_Scale_is_not_infinite.asciidoc b/410_Scaling/80_Scale_is_not_infinite.asciidoc index 398930cf6..f7643f71e 100644 --- a/410_Scaling/80_Scale_is_not_infinite.asciidoc +++ b/410_Scaling/80_Scale_is_not_infinite.asciidoc @@ -63,5 +63,5 @@ POST /counters/pageview/home_page/_update 这种嵌套的方式有可能会增加文档数量,但 Elasticsearch 生来就是为了解决它的。重要的是保持集群状态小而敏捷。 最终,不管你的初衷有多好,你可能会发现集群节点数量、索引、映射对于一个集群来说还是太大了。 -此时,可能有必要将这个问题拆分到多个集群中了。感谢{ref}/modules-tribe.html[`tribe` nodes], +此时,可能有必要将这个问题拆分到多个集群中了。感谢​{ref}/modules-tribe.html[`tribe` nodes]​, 你甚至可以向多个集群发出搜索请求,就好像我们有一个巨大的集群那样。