|
1 | 1 | [[controlling-relevance]]
|
2 |
| -== Controlling Relevance |
| 2 | +== 控制相关度 |
3 | 3 |
|
4 |
| -Databases that deal purely in structured data (such as dates, numbers, and |
5 |
| -string enums) have it easy: they((("relevance", "controlling"))) just have to check whether a document (or a |
6 |
| -row, in a relational database) matches the query. |
| 4 | +处理结构化数据(比如:时间、数字、字符串、枚举)的数据库,((("relevance", "controlling")))只需检查文档(或关系数据库里的行)是否与查询匹配。 |
7 | 5 |
|
8 |
| -While Boolean yes/no matches are an essential part of full-text search, they |
9 |
| -are not enough by themselves. Instead, we also need to know how relevant each |
10 |
| -document is to the query. Full-text search engines have to not only find the |
11 |
| -matching documents, but also sort them by relevance. |
| 6 | +布尔的是/非匹配是全文搜索的基础,但不止如此,我们还要知道每个文档与查询的相关度,在全文搜索引擎中不仅需要找到匹配的文档,还需根据它们相关度的高低进行排序。 |
12 | 7 |
|
13 |
| -Full-text relevance ((("similarity algorithms")))formulae, or _similarity algorithms_, combine several |
14 |
| -factors to produce a single relevance `_score` for each document. In this |
15 |
| -chapter, we examine the various moving parts and discuss how they can be |
16 |
| -controlled. |
| 8 | +全文相关的公式或 _相似算法(similarity algorithms)_ ((("similarity algorithms")))会将多个因素合并起来,为每个文档生成一个相关度评分 `_score` 。本章中,我们会验证各种可变部分,然后讨论如何来控制它们。 |
17 | 9 |
|
18 |
| -Of course, relevance is not just about full-text queries; it may need to |
19 |
| -take structured data into account as well. Perhaps we are looking for a |
20 |
| -vacation home with particular features (air-conditioning, sea view, free |
21 |
| -WiFi). The more features that a property has, the more relevant it is. Or |
22 |
| -perhaps we want to factor in sliding scales like recency, price, popularity, or |
23 |
| -distance, while still taking the relevance of a full-text query into account. |
| 10 | +当然,相关度不只与全文查询有关,也需要将结构化的数据考虑其中。可能我们正在找一个度假屋,需要一些的详细特征(空调、海景、免费 WiFi ),匹配的特征越多相关度越高。可能我们还希望有一些其他的考虑因素,如回头率、价格、受欢迎度或距离,当然也同时考虑全文查询的相关度。 |
24 | 11 |
|
25 |
| -All of this is possible thanks to the powerful scoring infrastructure |
26 |
| -available in Elasticsearch. |
| 12 | +所有的这些都可以通过 Elasticsearch 强大的评分基础来实现。 |
27 | 13 |
|
28 |
| -We will start by looking at the theoretical side of how Lucene calculates |
29 |
| -relevance, and then move on to practical examples of how you can control the |
30 |
| -process. |
| 14 | +本章会先从理论上介绍 Lucene 是如何计算相关度的,然后通过实际例子说明如何控制相关度的计算过程。 |
0 commit comments