当前位置: 首页 > elasticsearch, 搜索 > 正文

翻译 elasticsearch _boost

关键字:
1 星2 星3 星4 星5 星 (1 次投票, 评分: 5.00, 总分: 5)
Loading ... Loading ...
baidu_share

原文地址:http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-boost-field.html

Boosting is the process of enhancing the relevancy of a document or field. Field level mapping allows to define explicit boost level on a specific field. The boost field mapping (applied on the root object) allows to define a boost field mapping where its content will control the boost level of the document. For example, consider the following mapping:

Boosting是处理过程中提高文档或字段的相关性。字段级(level)映射允许在一个特定的field来明确提高等级。boost field 映射(应用在根对象)允许定义一个boost field 映射,当它的内容将控制这个文档的boost等级。也就是通过设置boost,来提高文档得分。例如,考虑下面的映射:

{
    "tweet" : {
        "_boost" : {"name" : "my_boost", "null_value" : 1.0}
    }
}

The above mapping defines mapping for a field named my_boost. If the my_boost field exists within the JSON document indexed, its value will control the boost level of the document indexed. For example, the following JSON document will be indexed with a boost value of 2.2:
上面的映射定义了一个field名字为my_boost。如果my_boost字段存在在JSON文档索引中,它将控制文档索引的boost等级。例如,下面的JSON文档将的boost 值设为2.2:

{
    "my_boost" : 2.2,
    "message" : "This is a tweet!"
}

本文固定链接: http://www.chepoo.com/translate-elasticsearch-_boost.html | IT技术精华网

翻译 elasticsearch _boost:等您坐沙发呢!

发表评论