Skip to content

Commit f7add7d

Browse files
committed
Finished half of 6.4
1 parent 9000719 commit f7add7d

File tree

4 files changed

+14
-26
lines changed

4 files changed

+14
-26
lines changed

052_Mapping_Analysis/00_Intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
**映射(mapping)**机制用于进行字段类型确认,将每个字段匹配为一种确定的数据类型(`string`, `number`, `booleans`, `date`等)。
22

3-
**分析(analysis)**机制用于进行**全文文本(Full Text)**的分析,以建立供搜索用的反向索引。
3+
**分析(analysis)**机制用于进行**全文文本(Full Text)**的分词,以建立供搜索用的反向索引。

052_Mapping_Analysis/30_Exact_vs_full_text.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ WHERE name = "John Smith"
4343

4444
* `"fox news hunting"`能返回有关hunting on Fox News的故事,而`"fox hunting news"`也能返回关于fox hunting的新闻故事。
4545

46-
为了方便在全文文本字段中进行这些类型的查询,Elasticsearch首先_分析_(analyzes)文本,然后使用结果建立一个_倒排索引_。我们将在以下两个章节讨论倒排索引及分析过程。
46+
为了方便在全文文本字段中进行这些类型的查询,Elasticsearch首先对文本**分析(analyzes)**,然后使用结果建立一个**倒排索引**。我们将在以下两个章节讨论倒排索引及分析过程。
4747

4848

4949

052_Mapping_Analysis/35_Inverted_index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ Elasticsearch使用一种叫做**倒排索引(inverted index)**的结构来做
7878
>### IMPORTANT
7979
>这很重要。你只可以找到确实存在于索引中的词,所以**索引文本和查询字符串都要标准化为相同的形式**
8080
81-
这个表征化和标准化的过程叫做**分析(analysis)**,这个在下节中我们讨论。
81+
这个表征化和标准化的过程叫做**分词(analysis)**,这个在下节中我们讨论。

052_Mapping_Analysis/40_Analysis.md

+11-23
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,23 @@
1-
[[analysis-intro]]
2-
=== Analysis and analyzers
1+
## 分析和分析器
32

4-
_Analysis_ is the process of:
3+
**分析(analysis)**是这样一个过程:
54

6-
* first, tokenizing a block of text into
7-
individual _terms_ suitable for use in an inverted index,
8-
* then normalizing these terms into a standard form to improve their
9-
``searchability'' or _recall_.
5+
* 首先,表征化一个文本块为适用于倒排索引单独的**词(term)**
6+
* 然后标准化这些词为标准形式,提高它们的“可搜索性”或“查全率”
107

11-
This job is performed by _analyzers_. An _analyzer_ is really just a wrapper
12-
which combines three functions into a single package:
8+
这个工作是**分析器(analyzer)**完成的。一个**分析器(analyzer)**只是一个包装用于将三个功能放到一个包里:
139

14-
Character filters::
10+
### 字符过滤器
1511

16-
First, the string is passed through any _character filters_ in turn. Their
17-
job is to tidy up the string before tokenization. A character filter could
18-
be used to strip out HTML, or to convert `"&"` characters to the word
19-
`"and"`.
12+
首先字符串经过**字符过滤器(character filter)**,它们的工作是在表征化(译者注:这个词叫做断词更合适)前处理字符串。字符过滤器能够去除HTML标记,或者转换`"&"``"and"`
2013

21-
Tokenizer::
14+
### 分词器
2215

23-
Next, the string is tokenized into individual terms by a _tokenizer_. A
24-
simple tokenizer might split the text up into terms whenever it encounters
25-
whitespace or punctuation.
16+
下一步,**分词器(tokenizer)**被表征化(断词)为独立的词。一个简单的**分词器(tokenizer)**可以根据空格或逗号将单词分开(译者注:这个在中文中不适用)。
2617

27-
Token filters::
18+
### 表征过滤
2819

29-
Last, each term is passed through any _token filters_ in turn, which can
30-
change terms (eg lowercasing `"Quick"`), remove terms (eg stopwords like
31-
`"a"`, `"and"`, `"the"` etc) or add terms (eg synonyms like `"jump"` and
32-
`"leap"`)
20+
最后,每个词都通过所有**表征过滤(token filters)**,它可以修改词(例如将`"Quick"`转为小写),去掉词(例如停用词像`"a"``"and"``"the"`等等),或者增加词(例如同义词像`"jump"``"leap"`
3321

3422
Elasticsearch provides many character filters, tokenizers and token filters
3523
out of the box. These can be combined to create custom analyzers suitable

0 commit comments

Comments
 (0)