在ElasticSearch中应该使用哪种数字来提升索引时间?

时间:2016-04-28 11:58:49

标签: boost elasticsearch elasticsearch-dsl

在我的网站项目中,我使用Django和elasticsearch_dsl。这是索引注册用户的示例代码:

from elasticsearch_dsl import DocType, ...

class UserDocType(DocType):
    pk = Long()
    fullname = String(analyzer='standard', boost=5, fields={'raw': String(index='not_analyzed')})
    description = String(analyzer='german', boost=0.5)
    keywords = String(analyzer='german', boost=9)
    boost_text_1 = String(analyzer='german', boost=18)
    boost_text_2 = String(analyzer='german', boost=27)
    boost_text_3 = String(analyzer='german', boost=36)

在某些示例中,我看到0到1之间的提升值,但在某些示例中,我看到30,40或更多。这是真的方式吗?是关于boost_mode还是score_mode?

0 个答案:

没有答案