Skip to content

Commit

Permalink
Fix links in asciidoctor
Browse files Browse the repository at this point in the history
It needs some zero width spaces.
  • Loading branch information
nik9000 committed Oct 21, 2019
1 parent 3f1f8f8 commit 1978bff
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion 052_Mapping_Analysis/40_Analysis.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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索引内部发生了什么,随着深入,我们会进一步讨论它。

Expand Down
4 changes: 2 additions & 2 deletions 230_Stemming/10_Algorithmic_stemmers.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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] 查看 `英语` 分析器配置文件,配置文件展示如下:

Expand Down Expand Up @@ -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,`asciifolding`>> 分词过滤器用以移除外语的附加符号。((("asciifolding token filter")))

Expand Down
2 changes: 1 addition & 1 deletion 230_Stemming/40_Choosing_a_stemmer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

`english`::

{ref}/analysis-porterstem-tokenfilter.html[`porter_stem`] 语汇单元过滤器(token filter)。
{ref}/analysis-porterstem-tokenfilter.html[`porter_stem`]&#8203; 语汇单元过滤器(token filter)。

`light_english`::

Expand Down
2 changes: 1 addition & 1 deletion 230_Stemming/50_Controlling_stemming.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`]&#8203; 语汇单元过滤器,同时阻止 `skies` 的词干提取:((("porter_stem token filter")))

[source,json]
------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions 240_Stopwords/20_Using_stopwords.asciidoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[using-stopwords]]
=== 使用停用词

移除停用词的工作是由 `stop` 停用词过滤器完成的,可以通过创建自定义的分析器来使用它(参见 使用停用词过滤器{ref}/analysis-stop-tokenfilter.html[`stop` 停用词过滤器])。但是,也有一些自带的分析器预置使用停用词过滤器:
移除停用词的工作是由 `stop` 停用词过滤器完成的,可以通过创建自定义的分析器来使用它(参见 使用停用词过滤器&#8203;{ref}/analysis-stop-tokenfilter.html[`stop` 停用词过滤器]&#8203;)。但是,也有一些自带的分析器预置使用停用词过滤器:

{ref}/analysis-lang-analyzer.html[语言分析器]::

Expand Down Expand Up @@ -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")))&#8203;{ref}/analysis-stop-tokenfilter.html[`stop` 停用词过滤器]&#8203; 中找到。

停用词可以通过指定一个特殊列表 `_none_` 来禁用。例如,使用 `_english_` 分析器而不使用停用词,可以通过以下方式做到:

Expand Down Expand Up @@ -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` 分析器时候,可以组合多个 &#8203;{ref}/analysis-stop-tokenfilter.html[`stop` 停用词过滤器]&#8203; 分词器((("stopwords", "using stop token filter")))((("stop token filter", "using in custom analyzer")))。例如:我们想要创建一个西班牙语((("Spanish", "custom analyzer for")))((("light_spanish stemmer")))的分析器:

* 自定义停用词列表
* `light_spanish` 词干提取器
Expand Down Expand Up @@ -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` 参数以内联方式指定停用词,那么你只能通过关闭索引,更新分析器的配置&#8203;{ref}/indices-update-settings.html#update-settings-analysis[update index settings API]&#8203;,然后在重新打开索引才能更新停用词。

如果你使用 `stopwords_path` 参数指定停用词的文件路径((("stopwords_path parameter"))) ,那么更新停用词就简单了。你只需更新文件(在每一个集群节点上),然后通过两者之中的任何一个操作来强制重新创建分析器:

Expand Down
4 changes: 2 additions & 2 deletions 410_Scaling/55_Retiring_data.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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")))&#8203;{ref}/modules-snapshots.html[`snapshot-restore` API]&#8203;备份数据。

[[close-indices]]
==== 关闭旧索引
Expand All @@ -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")))可以通过&#8203;{ref}/modules-snapshots.html[`snapshot-restore` API]&#8203;归档至长期存储例如共享磁盘或者 Amazon S3,以防日后你可能需要访问它们。
当存在备份时我们就可以将索引从集群中删除了。
2 changes: 1 addition & 1 deletion 410_Scaling/80_Scale_is_not_infinite.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ POST /counters/pageview/home_page/_update
这种嵌套的方式有可能会增加文档数量,但 Elasticsearch 生来就是为了解决它的。重要的是保持集群状态小而敏捷。

最终,不管你的初衷有多好,你可能会发现集群节点数量、索引、映射对于一个集群来说还是太大了。
此时,可能有必要将这个问题拆分到多个集群中了。感谢{ref}/modules-tribe.html[`tribe` nodes],
此时,可能有必要将这个问题拆分到多个集群中了。感谢&#8203;{ref}/modules-tribe.html[`tribe` nodes]&#8203;
你甚至可以向多个集群发出搜索请求,就好像我们有一个巨大的集群那样。

0 comments on commit 1978bff

Please sign in to comment.